Returns a duplicate of a given node. You can consider this a
generic "copy constructor" for nodes. The newly returned object should
be completely independent of the source object's subtree, so changes
in one after the clone has been made will not affect the other.
Note: since we never have any children deep is meaningless here,
ParentNode overrides this behavior.
See Also: ParentNode See Also: See Also: Example: Cloning a Text node will copy both the node and the text it See Also: contains. See Also:
See Also: Example: Cloning something that has children -- Element or Attr, for See Also: example -- will _not_ clone those children unless a "deep clone" See Also: has been requested. A shallow clone of an Attr node will yield an See Also: empty Attr of the same name. See Also:
See Also: NOTE: Clones will always be read/write, even if the node being cloned See Also: is read-only, to permit applications using only the DOM API to obtain See Also: editable copies of locked portions of the tree.
|