← Back to release summary

Declarative Shadow DOM

Category
DOM
Type
New or changed feature
Status
Enabled by default (Chrome 90)
Intent stage
Shipped

Summary

A declarative API to allow the creation of #shadowroot's using only HTML and no Javascript. Blog post: https://web.dev/declarative-shadow-dom/

Motivation

This API allows Web Components that use Shadow DOM to also make use of Server-Side Rendering (SSR), to get rendered content onscreen quickly without requiring Javascript for shadow root attachment.

Standards & signals

Docs: https://github.com/mfreed7/declarative-shadow-dom/blob/master/README.md

Samples: https://jsbin.com/huquloz

Explainers: https://github.com/mfreed7/declarative-shadow-dom/blob/master/README.md https://web.dev/declarative-shadow-dom/

View on chromestatus.com