A new way to implement and use Shadow DOM directly in HTML.
Published on Friday, February 17, 2023
Jason is a Web DevRel focused on speed and the JS ecosystem.
Developer on the Chrome team
Table of contents
- Building a Declarative Shadow Root
- Component hydration
- One shadow per root
- Streaming is cool
- Server-rendering with style
- Avoiding the flash of unstyled content
- Feature detection and browser support
- Further reading
Declarative Shadow DOM is a web platform feature, currently in the standardization process. It is enabled by default in Chrome version 111.
Declarative Shadow DOM has been available since Chrome 90 and Edge 91, but it used an older non-standard attribute called
shadowroot instead of the standardized