Availability
DOM Level 1 Core
Synopsis
Node cloneNode(boolean deep);Arguments
deep
If this argument is true, cloneNode(
) recursively clones all descendants of this node.
Otherwise, it clones only this node.
Returns
A copy of this node.
Description
The 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.
•
Table of Contents
•
Index
•
Reviews
•
Examples
•
Reader Reviews
•
Errata
JavaScript: The Definitive Guide, 4th Edition
By
David Flanagan
Publisher
: O'Reilly
Pub Date
: November 2001
ISBN
: 0-596-00048-0
Pages
: 936
Slots
: 1
This fourth edition of the definitive reference to
JavaScript, a scripting language that can be embedded
directly in web pages, covers the latest version of the
language, JavaScript 1.5, as supported by Netscape 6 and
Internet Explorer 6. The book also provides complete
coverage of the W3C DOM standard (Level 1 and Level 2),
while retaining material on the legacy Level 0 DOM for
backward compatibility.