Firefox extension object instantiating
Posted
by Michael
on Stack Overflow
See other posts from Stack Overflow
or by Michael
Published on 2010-05-06T14:29:57Z
Indexed on
2010/05/06
14:58 UTC
Read the original article
Hit count: 407
I want my javascript object to be initialized just once, so each new browser window will not create new data items, new functions, etc...
usually we initialize the code at the end of main javascript using load
window.addEventListener("load", main.onLoad, false);
so once the second browser window opened, the initialization code will start from scratch. However, I would like to re-use the existing object on consequent browsers.
Any mechanism that I can use?
© Stack Overflow or respective owner