-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Define Page Visibility in terms of HTML #7238
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-authoritative LGTM with a few nits
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it!
Thanks for working on this! Does 8000 this help with or impact #3957? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, very nice. I guess we should not merge until w3c/page-visibility#74 is resolved affirmatively? Let us know the latest on that per the TPAC discussions.
It'd be a nice bonus if we followed this up by inverting the device posture/screen orientation/web NFC hooks, maybe with some extra infrastructure since device posture and screen orientation also use "the next animation frame task" which has its own rigor issues. But this is a strict improvement on the status quo and fixing those specs to be perfectly rigorous is probably lower priority than other work you have been doing :).
It was resolved affirmatively at TPAC. @yoavweiss would you please comment on that one?
I have opened issues for those specs to do it and I will provide some guidance 😀 Not sure what the thought is about referring to e.g. WebNfc from HTML, when it's a standard that doesn't have implementer consensus. But I will leave it to owners of those specs |
Commented. This is fine to merge even though there are still WG mechanics to figure out about the old spec. |
Defines the document.hidden and document.visibilityState APIs in the HTML Standard, while improving their definitions to be more rigorous. This is similar to 3285b98 which did the same for the visibilitychange event. Also updates the discussion of "page is in the background" to refer to the new definitions. See w3c/page-visibility#74 and w3c/page-visibility#73 for more background.
Ooops, we forgot to actually export "visibility state", [=Document/hidden=] and [=Document/visible=]. There are quite a few specs depends on those. |
Sent #7337 |
to represent the algorithms for updating the visibility
to the new definitions.
To fully integrate specs referring to the Page Visibility spec
with the changes in the HTML spec, i.e. defining the visibilitychange
event, the different specs need to be called explicitly when the
visibility of the page changes.
For that, the visibilityState of the document needs to be properly
defined within HTML.
See w3c/page-visibility#74
and w3c/page-visibility#73
(See WHATWG Working Mode: Changes for more details.)
/browsers.html ( diff )
/browsing-the-web.html ( diff )
/dnd.html ( diff )
/dom.html ( diff )
/index.html ( diff )
/interaction.html ( diff )
/references.html ( diff )
/webappapis.html ( diff )