I want to create an creditcard autofill for shopify pages. My plan was to fill the cardnumber input field (for example) with document.getElementById('number').value = 12355444;
I've made two Observations: 1.) If I write it in the console nothing happens untill I do a right click in the specific input field and press inspect. After inspecting and executing in browser-console input-field will get filled. But why do I have to inspect the field first?
2.) If I execute the document.getElementById('number').value = 12355444; over my little Chrome-extension I'll get the error: Uncaught TypeError: Cannot set properties of null (setting 'value') at :1:53
How do i get it worked?, it seems like I cant access or it doesnt find the ID's of the input-form.
If you want to try it out, take for example: https://newtonsupplyco.com/ cart sth and go untill payment.
Thank you