Hello, Im making firefox extension and I have a problem with variables. Extension works with file (chrome://myextension/content/document.html) opened in few tabs. I want it to store a value in each tab, so I decided to store it in one of the html objects, that have got "Object" id:
data="foobar"
node=gBrowser.contentDocument.getElementById("ObjectId");
node.setUserData('data', data, {handle:function () {}});
For some reason, this doesn't work, when I want to get this variable in this way:
data=node.getUserData("data");
Can you spot an error in my code?
PS. This two pieces of code are separated methods. The html file is on a hard disk