Extension & Emerging Attributes
shadowrootcustomelementregistry
Boolean declarative-shadow-DOM attribute on template. It leaves the new shadow root without the document registry so a scoped custom-element registry can be initialized later. Without subsequent initialization, custom elements may remain unupgraded; support must be feature-checked.
Formal Syntax & Structure
html syntaxhtml
<template shadowrootmode="open" shadowrootcustomelementregistry>…</template>Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| shadowrootcustomelementregistry | boolean | Presence requests a null registry for later initialization. |
Working Example
Example Snippethtml
<div id="host"> <template shadowrootmode="open" shadowrootcustomelementregistry> <p>Shadow content</p> </template></div>