Web platform features explorer

Declarative shadow DOM

Newly available since 2024-02-20
Tags: api html Groups: HTML DOM Web Components

The shadowrootmode attribute on <template> creates a shadow root without the use of JavaScript. It is a declarative alternative to the attachShadow() method.

Learning resources on MDN

No MDN documentation found. You can search for the feature on MDN. If you believe that MDN has no documentation about this feature, you can open an issue on MDN's GitHub repository.

Browser support (view on caniuse.com)

Usage (according to Chrome Platform Status)

~0.072% of page loads. More data at chromestatus.

Specifications