Re: [whatwg/dom] Option to allow `querySelector` to query shadow roots (Issue #1422)

jakearchibald left a comment (whatwg/dom#1422)

@jonathanKingston 

> Well I don't think in this case this can work well for closed shadow routes

Why not? Closed shadow roots can contain elements too.

Imagine we had an API to get all open shadow roots, then you could have:

```js
const videoElements = document.querySelectorAll('video', {
  shadowRoots: [...document.getOpenShadowRoots(), ...myAppsClosedShadowRoots],
});
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/1422#issuecomment-3823665578
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/dom/issues/1422/3823665578@github.com>

Received on Friday, 30 January 2026 13:09:25 UTC