DEV Community

loading...

Discussion on: Sure you want to leave?—browser beforeunload event

Collapse
samthor profile image
Sam Thorogood Author

Moving to another page can be detected by watching focus or the Page Visibility API. The page is still open in that case, just hidden or not being used by the user.