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

window.unload event not emitted #16

Open
orslumen opened this issue Apr 3, 2011 · 0 comments
Open

window.unload event not emitted #16

orslumen opened this issue Apr 3, 2011 · 0 comments

Comments

@orslumen
Copy link

orslumen commented Apr 3, 2011

When a different page is loaded, the window.unload event is not emitted.

For now I have added the following code at the top of Envjs.exchangeHTMLDocument in core.js:
try {
if (doc === window.document) {
event = doc.createEvent('HTMLEvents');
event.initEvent('unload', false, false);
window.dispatchEvent( event, false );
}
} catch (eee) {
log.debug('window unload event failed %s', eee);
//swallow
}

I am note sure though whether or not this code is in the right location... see orslumen@2c2027e

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

1 participant