HTML Attributes
HTML shadowrootcustomelementregistry attribute
Requests use of a scoped custom element registry setup for a declarative shadow root in supporting implementations. This is an evolving feature; verify the current specification and browser support before use. Applicable elements include: <template>. Check each element’s value rules. Boolean syntax: presence enables the state; omit the attribute to disable it. A string value of "false" does not turn it off.
Formal Syntax & Structure
html syntaxhtml
shadowrootcustomelementregistryParameters & Attributes
| Name | Type | Description |
|---|---|---|
| shadowrootcustomelementregistry | boolean | Requests use of a scoped custom element registry setup for a declarative shadow root in supporting implementations. This is an evolving feature; verify the current specification and browser support before use. |
Working Example
Example Snippethtml
<div> <template shadowrootmode="open" shadowrootcustomelementregistry> <span>Scoped content</span> </template></div>