Hey,
I recently started programming an Add-on for Firefox. I am trying to change the value of an input field with code. I tried using
document.getElementById("email").value = "test@test.com"
But that doesn’t work
(Error: Could not establish connection. Receiving end does not exist)
I could not find any documentation for Element.value
so I don’t know if I am missing some permissions.
manifest.json
{
"manifest_version": 2,
"name": "Email Manager",
"version": "1.0",
"description": "Test Add-on",
"icons": {
"48": "test-icon.png"
},
"content_scripts": [
{
"matches": ["<all_urls>"],
"js": ["email-manager.js"]
}
]
}
email-manager.js
document.getElementById("email").value = "test@test.com"