[whatwg/dom] `ElementInternals.shadowRoot` is `null` but `this.shadowRoot` is not (its a `ShadowRoot`) (Issue #1365)

trusktr created an issue (whatwg/dom#1365)

### What is the issue with the DOM Standard?

This is confusing because the state of an element's `ElementInternals.shadowRoot` property is not in sync with the actual state of the DOM.

This is reproducible in all browsers:

https://codepen.io/trusktr/pen/NPWmGMV

This code,

```js
console.log(internals.shadowRoot) // null
console.log(this.shadowRoot) // ShadowRoot
```

should either log two `null` values, or two `ShadowRoot` values, for consistency.

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

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

Received on Sunday, 6 April 2025 18:08:17 UTC