Skip to content

Replace deprecated unload event with pagehide event#824

Merged
janthurau merged 1 commit intoueberdosis:mainfrom
jul13579:use-pagehide-event
May 23, 2024
Merged

Replace deprecated unload event with pagehide event#824
janthurau merged 1 commit intoueberdosis:mainfrom
jul13579:use-pagehide-event

Conversation

@jul13579
Copy link
Contributor

@jul13579 jul13579 commented May 23, 2024

Dear hocuspocus folks,

I noticed that the HocuspocusProvider is using the deprecated unload event. MDN advises to use the pagehide event instead, so this is what I chose to use for this PR. I searched for any open and closed issues and PRs that could be related to this and hence am aware of #658 and #657, where the previously used beforeunload event was found to be problematic.

I checked if the pagehide event also fires when starting a download as described in #657 and found that it in fact does not fire. Therefore I think this event might be a viable alternative to unload.

Cheers,
Julian

@janthurau janthurau merged commit 194f43e into ueberdosis:main May 23, 2024
@janthurau
Copy link
Contributor

Thanks! Sounds good :)

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