Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace the deprecated unload event with pagehide
The unloadHandler is called by an eventListener for the 'unload' event when the user moves away from the page being served by y-websocket. However, the unload event is now deprecated (see https://web.dev/articles/bfcache?utm_source=lighthouse&utm_medium=devtools#never-use-the-unload-event ) and the recommendation is to replace it with the 'pagehide' event. This PR does that, in both locations in y-websocket.js where it is used.
- Loading branch information