forge icon indicating copy to clipboard operation
forge copied to clipboard

support declarative shadow DOM

Open DRiFTy17 opened this issue 2 years ago • 0 comments

Describe the feature: With browsers starting to implement support for declarative shadow DOM, we should get a head start and adjust components to properly handle initialization for compatibility.

Current browser support: https://caniuse.com/?search=declarative%20shadow%20dom

Resources: https://web.dev/declarative-shadow-dom/

Describe any alternatives you've considered: None. These are new browser APIs.

Additional context: This allows custom elements with shadow DOM to be server-side rendered, and serialize the shadow root content as a <template> tag that is hydrated automatically by the browser during parsing on the client. This means that the shadowRoot property will already be available when a custom element is instantiated, and no longer require the component to set up its internal template manually.

DRiFTy17 avatar Feb 20 '23 14:02 DRiFTy17