| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/clonable | [Back] [Original] |
Get to know MDN better
Since April 2024, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
The clonable read-only property of the ShadowRoot interface returns true if the shadow root is clonable, and false otherwise.
When the value is true, a shadow host cloned with Node.cloneNode() or Document.importNode() will include a copy of the shadow root.
By default the value is false.
It can be set to true using the clonable option of the Element.attachShadow() method or by setting the shadowrootclonable attribute of the <template> element that is being used to declaratively attach a shadow root.
true if the shadow root is clonable, and false otherwise.
const host = document.createElement("div");
const shadowRoot = host.attachShadow({
mode: "open",
clonable: true,
});
shadowRoot.clonable;
// true
| Specification |
|---|
| DOM # dom-shadowroot-clonable |
This page was last modified on Apr 10, 2025 by MDN contributors.
ShadowRootYour blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |