WebExtension: Traversal permission denied to access the "target" object
Using FF WebExtension I am trying to clone an element from a website that I don't have. This is what I am using (taken from W3C ).
// Get the last <li> element ("Milk") of <ul> with id="myList2"
var itm = document.getElementById("myList2").lastChild;
// Copy the <li> element and its child nodes
var cln = itm.cloneNode(true);
// Append the cloned <li> element to <ul> with id="myList1"
document.getElementById("myList1").appendChild(cln);
However, this error appears:
Error: permission to access object "target"
Here is my manifest:
{
"manifest_version": 2,
"name": "w",
"version": "0.1",
"description": "w",
"icons": {
"48": "icons/border-48.png"
},
"content_scripts": [
{
"matches": ["http://localhost/*"],
"js": ["rh-addbutton.js","rh-addpage.js"]
}
],
"permissions": ["http://localhost/*"]
}
Am I missing permission? I cannot find the correct permission on MDN.
+3
source to share
No one has answered this question yet
Check out similar questions: