Web features explorer

Declarative shadow DOM

Newly available since 2024-02-20
Tags: api html Groups: HTML 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

Browser support (view on caniuse.com)