Re: [whatwg/dom] [proposal] Node.containingShadowRoot (#826)

It would not different to accessing the root node, but it can be `O(1)` rather that going through all the parents.

I just got a case where I wanted to check the activeElement of the containing tree, so `(element.containingShadowRoot || document).activeElement`.

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

Received on Friday, 31 January 2020 09:43:03 UTC