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

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -