- From: Zacky Ma <notifications@github.com>
- Date: Mon, 02 Mar 2026 15:49:21 -0800
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 2 March 2026 23:49:25 UTC
marchbox left a comment (whatwg/dom#1189) > What are concrete use cases for `NodeIterator` or `TreeWalker` to cross shadow boundaries? I’ve been working on a polyfill for `focusgroup` recently and because `focusgroup` supports shadow DOM natively, I needed to walk across the shadow boundaries to find eligible items. I’d say the majority of the time I spent on the project was to make sure shadow DOM tree walking work properly. This includes not only walking into and out of shadow trees, but also treating slotted elements as in-place replacement of their assigned slot elements. The other thing is walking forward (`nextNode()`) is fairly straightforward, but walking backward is significantly more complex since you have go deep into the shadow tree and find the very last descendant first. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/issues/1189#issuecomment-3987696695 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/dom/issues/1189/3987696695@github.com>
Received on Monday, 2 March 2026 23:49:25 UTC