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/Node/cloneNode below:

Node: cloneNode() method - Web APIs

Syntax
cloneNode()
cloneNode(deep)
Parameters
deep Optional

If true, then the node and its whole subtree, including text that may be in child Text nodes, is also copied.

If false, only the node will be cloned. The subtree, including any text that the node contains, is not cloned.

Note that deep has no effect on void elements, such as the <img> and <input> elements.

Return value

The new Node cloned. The cloned node has no parent and is not part of the document, until it is added to another node that is part of the document, using Node.appendChild() or a similar method.

Example
let p = document.getElementById("para1");
let p_prime = p.cloneNode(true);
Specifications Browser compatibility

Loading…


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.5