I'm a new developer trying to make a autofill chrome extension. I manage to retrieve an input from the user but I cannot manage to put that input in the input box on a site. I am trying this on the supreme webshop.
chrome.runtime.onMessage.addListener(gotMessage);
function gotMessage(message, sender, sendResponse) {
let name = message.txt;
let nameField = document.getElementsByClassName('order_billing_name');
nameField.value = name;
console.log(nameField.value);
}
I get the correct text in the nameField.value console log but the text does not show up on the site. Can someone help me?