← Back to release summary

ContentVisibilityAutoStateChanged event

Category
Miscellaneous
Type
New or changed feature
Status
In development (Chrome In development)
Intent stage
Prepare to ship

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)

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.

Standards & signals

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

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

View on chromestatus.com