Intent to Prototype: VisibilityStateEntry

71 views
Skip to first unread message

Nicolás Peña

unread,
Jul 9, 2020, 5:45:37 PM7/9/20
to blink-dev
n...@chromium.org https://docs.google.com/document/d/1l5kHiJRkdQwEN-CYI5_mUNODhQVB5rCyjN4jHDdXDHA/edit# Specification will go here but not there yet: https://w3c.github.io/page-visibility/ https://github.com/w3ctag/design-reviews/issues/534 Exposes the initial visibility state of the page plus any visibility state changes that the page goes through to the PerformanceObserver, with buffered flag support. Motivation
Currently the Page Visibility API enables querying the current visibility state of the page and adding an event handler which will be executed when the visibility state changes in the future. However, this creates a gap for developers that are interested in knowing the full visibility states of the page, from the beginning of the page load: the initial visibility state and any very early visibility state changes that occur before JavaScript has had a chance to query the visibility state or register an event handler.
Risks
Low risk, as this API should not be user-visible and we expect other major browser vendors to implement the API at some point, as they all currently implement document.visibilityState.

This API has been discussed in the W3C WebPerf WG. Minutes here: https://docs.google.com/document/d/1PMbJ8kUHtrrCZxHJfKXcV0YQeTxyMOH4AORgd2VuhOw/edit

Official signals: none yet.
Yes No tests yet, but they will go on https://wpt.fyi/results/page-visibility?label=experimental&label=master&aligned https://www.chromestatus.com/feature/5683502144028672
This intent message was generated by Chrome Platform Status, plus a large amount of manual modifications because it does not produce the right message.

Reply all
Reply to author
Forward
0 new messages