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

jonathanKingston left a comment (whatwg/dom#1422)

Thanks for the reference, I wasn't aware of that! I think the use-case is pretty different in regards to passing shadow roots, it seems that it returns a range of any of the shadows **_entirely_** when contained within the shadow root. 

https://www.mail-archive.com/blink-dev@chromium.org/msg13171.html discusses that:
> If the selection crosses a shadow root boundary that isn’t  provided in the shadowRots list, then the StaticRange's endpoints will be “rescoped” to be outside that tree. This makes sure we do not expose unknown shadow trees.

So I think the read is that because this provides ranges, it needs to propagate up to known open ones. I don't think this is a performance concern.

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

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

Received on Friday, 30 January 2026 10:03:12 UTC