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

I had a question about the second use case in the explainer:

> Similarly, the developer may want to stop any other script updates (e.g. canvas updates) when the user-agent is not rendering the element.

I may be missing something, but isn't that better served by using an IntersectionObserver? In the sense that you presumably don't want to continue making visual-only updates for elements that are offscreen but focused or highlighted. Which is the behavior with IntersectionObserver already - and in order to achieve this with the new event you'd need to track those states and exempt those elements.

-- 
GitHub Notification of comment by bgrins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7384#issuecomment-1184892392 using your GitHub account


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

Received on Thursday, 14 July 2022 21:00:26 UTC