[csswg-drafts] [css-contain-3] Proposal: Add an event to fire when content-visibility: auto state changes (#7384)

vmpstr has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-contain-3] Proposal: Add an event to fire when content-visibility: auto state changes ==
Right now we specify that content-visibility: auto [skips its content when the element isn't relevant to the user](https://www.w3.org/TR/css-contain-2/#valdef-content-visibility-auto). This means that the contents of the element will not be rendered by the UA. This is also a great opportunity for frameworks (e.g React) or general script (e.g. canvas updates) to stop, since the effect of these updates would not be rendered anyway.

However, to coordinate the starting/stopping updates, the UA should give the developer an signal (this proposed event) which would inform script that the rendering state changed.

The name is hard to come up with but I have a couple of proposals in the explainer:
https://github.com/vmpstr/web-proposals/blob/main/explainers/cv-auto-event.md

Happy to hear other suggestions or thoughts about this in general.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7384 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 17 June 2022 16:31:29 UTC