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

Migrate from beforeunload/unload events #296

Closed
chris-steele opened this issue Nov 13, 2023 · 2 comments
Closed

Migrate from beforeunload/unload events #296

chris-steele opened this issue Nov 13, 2023 · 2 comments

Comments

@chris-steele
Copy link
Contributor

chris-steele commented Nov 13, 2023

Subject of the issue

Chrome will soon soft deprecate the unload event. The functionality will be inoperable on all sites by Q1 2025 unless an opt-in is utilised. Note that the opt-in is expected to be a temporary measure and hard deprecation will follow which will see the event become completely inoperable.

Propose we switch unload to pagehide to detect when a user is leaving a course. Note that like beforeunload/unload this event is also unreliable, but we mitigate this by persisting data on visibilitychange (hidden) by default.

Your environment

Relevant to all browsers and devices

@oliverfoster
Copy link
Member

oliverfoster commented Nov 13, 2023

I don't think we should replace unload. More add pagehide.

Existing issue: adaptlearning/adapt_framework#3481

beforeunload is an entirely different use-case and will not be deprecated as far as I understand.

@joe-allen-89
Copy link
Contributor

Closing as duplicate of adaptlearning/adapt_framework#3481

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

3 participants