I forgot to tell you that the javascript should be injected in a webpage in a greasemonkey-similar way, so the timer shouldn't be active everywhen, but only when the page is loaded this is why more timers should be possible on different tabs the problem is that the timers move from a tab to another, as if the object "window" changes...
I've noticed that the same problem comes with every event listener... onClick, onMouseOver, etc... Basically the idea is "how do I work in a closed space, a tab, without limitations when trying to access a mozilla component"? 2007/11/21, Eric H. Jung <[EMAIL PROTECTED]>: > > > --- Marco Pivetta <[EMAIL PROTECTED]> wrote: > > > Hi everybody, > > I've just added a window.setInterval([...something...]) to my > extension's > > javascript code. > > I am having problems with the scope of the extension. > > Every time I open a new tab the event listener "moves" from the old tab > to > > the new one. > > This results in a chaos of intervals that get overlapped and literally > EAT > > the CPU load. > > This because I load window.setInterval([...something...]) instead of > > SOMETHING.setInterval([...something...]), where SOMETHING should be an > > element related with the webpage tab. > > Any ideas? How do I get the tab element? I've browsed half of the MDC > wiki > > without finding how to limit a setInterval to a single tab. > > I've tried with many elements, but none of them seems to have the method > > setInterval. > > Thank you for any help > > Would using nsITimer instead of setInterval() help? > http://www.xulplanet.com/references/xpcomref/ifaces/nsITimer.html > > _______________________________________________ > Project_owners mailing list > [email protected] > https://www.mozdev.org/mailman/listinfo/project_owners > -- Standard Ogame Project - http://stogame.lepihost.net Making Ogame a better place...
_______________________________________________ Project_owners mailing list [email protected] https://www.mozdev.org/mailman/listinfo/project_owners
