-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Description
I noticed today that the default dom-shim in @lit-labs/ssr does not implement the HTMLElement.shadowRoot property. Specifically, invoking attachShadow() with an open shadow-root configuration does not cause the created shadow root for the element to be exposed from the shadowRoot property; it only returns the shadow root object.
I know that you're trying to keep the dom-shim lean, but I was wondering if you would consider a PR that implements the shadow root getter behavior.
For context, I'm working on FAST's SSR implementation. We're hoping to align to the same dom-shim constraints as Lit, however, FAST only caches shadow root references for elements defined with a closed shadow root. In open shadow root cases, the shadow root will simply be retrieved from the element's shadowRoot property anytime the shadow root needs to be manipulated or inspected. This is currently causing a core code path to throw.
I'm sure we can adjust our runtime or dom-shim code to accommodate this gap, but I thought I would file an issue with ya'll first to see if this is a feature you're interested in taking. I'm happy to put up a PR if it is.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status