Re: [csswg-drafts] [cssom-view] Proposal: add Element.isRendered() to detect if element is rendered. (#6850)

> Worst-case performance summary:
> 
> * Forces style for non-skipped parts of the document
> * Requires an ancestor tree walk for skipped elements up to a non-skipped ancestor

I agree. Also note that even if we tie this function only to [being rendered](https://html.spec.whatwg.org/#being-rendered), the style update (of non-skipped parts) would still be required. I think the extra ancestor walk is a small price to pay to let developers reliably check and avoid computation in non-document-visible trees.

Bikeshed: maybe isDocumentVisible instead of isVisibleToDocument?

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


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

Received on Friday, 10 December 2021 17:08:56 UTC