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

Add event to intercept and prevent window closing #131

Open
gadamsgh opened this issue Jan 24, 2019 · 1 comment
Open

Add event to intercept and prevent window closing #131

gadamsgh opened this issue Jan 24, 2019 · 1 comment

Comments

@gadamsgh
Copy link

The window class emits an event when the window is already closed. I'd like to have the ability to intercept the attempted close and cancel it if desired. The primary use case would be to allow certain types of cleanup/saving code on the launched website to finish execution before terminating the window/process.

Could this be added as an enhancement?

@pavelfeldman
Copy link
Collaborator

Would onbeforeunload-alike behavior work for you? You can call a binding / rpc method from within the handler synchronously, it should work.

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