firefox extension global variable -
how can save values event function global variable in firefox extension or there better way?
code:
var bs = { onload: function() {...}, onpress: function(e) {...}, onmenuitemcommand: function(e) {...}, ontoolbarbuttoncommand: function(e) {...}, }; window.addeventlistener("load", function () { bs.onload(); }, false); document.addeventlistener("keypress", function(e) {bs.onpress(e); }, false, true);
tried initialize before "var bs" variable reset.
best, us
found solution,
if declare variable this:
window['variablename'] = "";
you can access in functions.
Comments
Post a Comment