Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timers not cleared when new page is loaded #15

Open
orslumen opened this issue Apr 3, 2011 · 1 comment
Open

Timers not cleared when new page is loaded #15

orslumen opened this issue Apr 3, 2011 · 1 comment

Comments

@orslumen
Copy link

orslumen commented Apr 3, 2011

When a different page is loaded, the timers defined in the old page are still active.

For now I have added the following code to Envjs.exchangeHTMLDocument in core.js:
if (doc === window.document) {
Envjs.timers.length = 0;
}

But that may be too crude a method when there are multiple windows involved.

@chrisnash
Copy link

This issue is a killer right now; not only do the timers continue running, but they also block env.js from returning (on the Rhino platform at least) which is causing issues for projects that are using it (such as chilicat/JsChilicat#12 ).

Would hope someone can provide some guidance on the right way to clear the timers, not just on exchangeHTMLDocument but also to make sure env-js doesn't end up getting blocked from exiting.

SkUrRiEr pushed a commit to SkUrRiEr/env-js that referenced this issue Mar 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants