Re: [csswg-drafts] [css-scoping] `:has-shadow` pseudo-class (#11007)

It probably makes sense that this would not match closed shadowRoots? If it did, it would leak that detail, which might be unacceptable. It'd also match built-ins with shadowRoot which is likely undesirable.

And for comparison to the slower, more verbose code one might have now:
* today: `Array.from(document.querySelectorAll('*')).filter(n => n.shadowRoot)`
* with this: `document.querySelectorAll(':has-shadow')`

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


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

Received on Monday, 7 October 2024 16:08:43 UTC