A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/clonable below:

ShadowRoot: clonable property - Web APIs

ShadowRoot: clonable property

Baseline 2024

Newly available

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.

Value

true if the shadow root is clonable, and false otherwise.

Examples
const host = document.createElement("div");
const shadowRoot = host.attachShadow({
  mode: "open",
  clonable: true,
});

shadowRoot.clonable;
// true
Specifications Browser compatibility

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3