Exposes to PerformanceObserver the initial visibility state of a page plus any visibility state changes that the page goes through. Also adds support for this to the observe() method's buffered flag.
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
This will frequently be used in tandem with other performance APIs, so the choice to integrate with PerformanceObserver seems natural in that regard.
This can already be somewhat polyfilled by appending a very early JavaScript snippet to the page, querying document.visibilityState, and registering an onvisibilitychange event handler.
This API does not introduce any security/privacy risks that would not be already present with the Page Visibility API.
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
N/A
Shipping on desktop | 115 |
Shipping on Android | 115 |
Shipping on WebView | 115 |
Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).
https://github.com/whatwg/html/pull/8206Summary
Exposes to PerformanceObserver the initial visibility state of a page plus any visibility state changes that the page goes through. Also adds support for this to the observe() method's buffered flag.
Blink component
Blink>PerformanceAPIsSearch tags
visibilityTAG review
https://github.com/w3ctag/design-reviews/issues/534TAG review status
Issues addressedRisks
Interoperability and Compatibility
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
Gecko: Positive (https://github.com/whatwg/html/pull/8206#issuecomment-1499406083)
WebKit: No signal
Web developers: No signals
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAJn%3DMYaRn4fPjxGmtLT4zTEUfq-r4esCpfU8EU36FhnNk4CGag%40mail.gmail.com.
Thanks for pushing this over the line!!On Tue, Apr 25, 2023 at 10:26 AM Noam Rosenthal <nrose...@chromium.org> wrote:What's preventing the PR from landing?
On Wed, Apr 26, 2023 at 1:28 PM Yoav Weiss <yoav...@chromium.org> wrote:Thanks for pushing this over the line!!On Tue, Apr 25, 2023 at 10:26 AM Noam Rosenthal <nrose...@chromium.org> wrote:What's preventing the PR from landing?Nothing at all. Sending this I2S is part of showing that Chrome is going to ship this. Was planning on merging the enabled-by-default CL after the spec PR is merged.
LGTM2
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAL5BFfWfyDdaf9oC8_tWC3o41fC0oy60iqZkwN%2B6ZtzEF79LkQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/fc72248b-b860-0fc1-d191-83ae5d8502bd%40chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/fc72248b-b860-0fc1-d191-83ae5d8502bd%40chromium.org.