AvailabilityDOM Level 1 Core SynopsisNode cloneNode(boolean deep); Arguments
ReturnsA copy of this node. DescriptionThe cloneNode( ) method makes and returns a copy of the node on which it is called. If passed the argument true, it recursively clones all descendants of the node as well. Otherwise, it clones only the node and none of its children. The returned node is not part of the document tree, and its parentNode property is null. When an Element node is cloned, all of its attributes are also cloned. Note, however, that EventListener functions registered on a node are not cloned. |