Window never fires beforeunload/unload events
See original GitHub issueHello!
window.onclose = () => console.log("I'm out!")
window.close()
Well, this piece of code isn’t working correctly. The window memory is freed, but the event is not triggered. Is this expected to work?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Why onbeforeunload event is not firing - Stack Overflow
3) It is fired only if there was ANY interaction of the user with the site. Without ANY interaction (even one click anywhere)...
Read more >unload And beforeunload Events And How To Debug Them ...
Order: beforeunload will always fire before unload event (makes sense ... other windows beforeunload events would fire after top window ifr.
Read more >Window: beforeunload event - Web APIs | MDN
The beforeunload event is fired when the window, the document and its resources are about to be unloaded. The document is still visible...
Read more >Sure you want to leave?—browser beforeunload event
use the beforeunload event to warn a user they're going to close your page, but only when it's important · a Set of...
Read more >Page: DOMContentLoaded, load, beforeunload, unload
The beforeunload event on window triggers when the user wants to leave the page. If we cancel the event, browser asks whether the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
https://mobile.twitter.com/slicknet/status/782274190451671040
Any fix for this?