- From: Darien Maillet Valentine <notifications@github.com>
- Date: Tue, 16 May 2023 11:20:13 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 16 May 2023 18:20:19 UTC
You can still reach the div’s closed shadow root if the shadow root’s content includes a custom element (or even a builtin with onsomething) because it will be their `parentNode`. This may not be particularly useful in most cases but figured it was worth mentioning that it’s not the case that there’s _definitely_ no reference to it from script. The following logs the div’s closed shadow root: ```html <div> <template shadowroot=closed> <x-x></x-x> </template> </div> <script> customElements.define("x-x", class extends HTMLElement { connectedCallback() { console.log(this.parentNode); } }); </script> ``` -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/issues/831#issuecomment-1550151331 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/dom/issues/831/1550151331@github.com>
Received on Tuesday, 16 May 2023 18:20:19 UTC