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

Deprecate and avoid unload event handler #9984

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

niloc132
Copy link
Contributor

This is a proposal to resolve #9908 - the unload and beforeunload event handling is split now, so that only explicit calls to WindowImpl.initWindowCloseHandler(), Window.addCloseHandler(), or Window.addWindowCloseListener() can cause the unload event handler to be attached - all of which are now deprecated. The beforeunload event wiring is now the only event handler set up when Window.addWindowClosingHandler etc are called.

Core formerly intended to prevent memory leaks during the unload event is removed, since modern browsers do not leak these handlers.

Fixes #9908

@niloc132 niloc132 added this to the 2.12 milestone Jul 20, 2024
Also adds suggestions on how they can be returned to semi-reliability.
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

Successfully merging this pull request may close these issues.

Remove general usage of Window unload event
2 participants