Get to know MDN better
Since February 2024, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
The shadowRootMode property of the HTMLTemplateElement interface reflects the value of the shadowrootmode attribute of the associated <template> element.
Note: This property is not useful for developers, and is only documented for completeness. If a <template> element is used to declaratively create a ShadowRoot, then this object and property do not exist. Otherwise, if an HTMLTemplateElement is created, the value of this property is irrelevant because the object is not a shadow root and cannot subsequently be changed to a shadow root.
Reflects the value of the shadowrootmode attribute of the associated <template> element.
| HTML # dom-template-shadowrootmode |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Feb 22, 2026 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.