Skip to content

Add visibilitychange event; Safari support partial #6763

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

Conversation

sideshowbarker
Copy link
Member

@sideshowbarker sideshowbarker commented Sep 25, 2020

This patch in this PR adds data for the visibilitychange event — basically just by copying over the existing data for the onvisibilitychange event handler, but with Safari support marked as partial (due the fact that Safari apparently doesn’t fire the event as expected when visibilityState transitions to hidden).

The patch in this PR also includes a change which marks Safari support for the onvisibilitychange event handler and document.visibilityState property as partial (for the same reason described above).

See also: https://bugs.webkit.org/show_bug.cgi?id=151234 (+ related bugs)
Marginally related: https://github.com/mdn/sprints/issues/3722

This change adds data for the visibilitychange event — basically just by
copying over the existing data for the onvisibilitychange event handler,
but with Safari support marked as partial (due the fact that Safari
apparently doesn’t fire the event as expected when visibilityState
transitions to "hidden").

See also: https://bugs.webkit.org/show_bug.cgi?id=151234 (+ related bugs)
Marginally related: https://github.com/mdn/sprints/issues/3722
@github-actions github-actions bot added the data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Sep 25, 2020
@sideshowbarker
Copy link
Member Author

To indicate clearly to developers that when visibilityState transitions to hidden, the visibilitychange event doesn’t fire as expected in Safari, I added warnings to the following MDN articles:

This change marks support for the onvisibilitychange event handler and
document.visibilityState property as partial_implementation:true for
Safari (due the fact that Safari apparently doesn’t fire visibilitychange
as expected when visibilityState transitions to "hidden").
@sideshowbarker sideshowbarker force-pushed the sideshowbarker/visibilitychange-event-add-and-mark-Safari-as-partial branch from 40ba5eb to 12bbbd3 Compare September 25, 2020 10:53
Copy link
Contributor

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thank you! 🎉

@ddbeck ddbeck merged commit 09bdaf3 into mdn:master Sep 29, 2020
@sideshowbarker sideshowbarker deleted the sideshowbarker/visibilitychange-event-add-and-mark-Safari-as-partial branch October 6, 2020 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants