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

Implement close callback #15

Closed
wants to merge 1 commit into from
Closed

Implement close callback #15

wants to merge 1 commit into from

Conversation

meyerzinn
Copy link
Contributor

This PR implements the close callback via the browser's beforeunload event, which is fired just prior to the page being unloaded.

Note: We should mention there are some limitations on what the callback handler can do with the DOM depending on the browser. In some, opening a dialog is not allowed (to prevent annoying pop-ups).

@dmitshur dmitshur deleted the branch goxjs:master July 4, 2023 02:36
@dmitshur dmitshur closed this Jul 4, 2023
dmitshur pushed a commit that referenced this pull request Jul 4, 2023
Implement the close callback via the browser's beforeunload event,
which is fired just prior to the page being unloaded.

It might be worth documenting there are some limitations on what the
callback handler can do with the DOM depending on the browser.
In some, opening a dialog is not allowed (to prevent annoying pop-ups).

GitHub-Pull-Request: #15
@dmitshur
Copy link
Member

dmitshur commented Jul 4, 2023

Thanks. Merged as commit 622eb27.

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.

2 participants