Intent to Prototype: ContentVisibilityAutoStateChanged event

56 views
Skip to first unread message

Vladimir Levin

unread,
Jul 11, 2022, 1:33:05 PM7/11/22
to blink-dev

Contact emails

vmp...@chromium.org

Explainer

https://github.com/vmpstr/web-proposals/blob/main/explainers/cv-auto-event.md

Specification



Summary

This proposal is to add an event that would fire on a content-visibility: auto element when the rendering state of the element changes due to any of the attributes that make the element relevant to the user (https://www.w3.org/TR/css-contain-2/#relevant-to-the-user)



Blink component

Blink

Motivation

The use-case for this is to let developers have greater control over when to stop or start rendering in response to the user-agent stopping or starting rendering of the content-visibility subtree. For example, the developer may want to stop React updates in a subtree that is not rendered by the user-agent. Similarly, the developer may want to stop any other script updates (e.g. canvas updates) when the user-agent is not rendering the element.



Initial public proposal

https://github.com/w3c/csswg-drafts/issues/7384#issuecomment-1176847043

TAG review

https://github.com/w3ctag/design-reviews/issues/756

TAG review status

Not applicable

Risks



Interoperability and Compatibility

This is a new feature that enhances `content-visibility: auto` use. It poses minimal interop and compat risks, and can be feature detected and polyfilled



Gecko: No signal (https://github.com/mozilla/standards-positions/issues/664)

WebKit: No signal (https://github.com/WebKit/standards-positions/issues/33)

Web developers: No signals

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?



Debuggability

This feature can be debugged similarly to other events



Is this feature fully tested by web-platform-tests?

Yes

Flag name

ContentVisibilityAutoStateChangedEvent

Requires code in //chrome?

False

Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1343432

Estimated milestones

No milestones specified



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5179553291436032

This intent message was generated by Chrome Platform Status.

Reply all
Reply to author
Forward
0 new messages