TDOMElement.CloneNode function
Creates a DOM node that is a copy of the DOM Element.
Declaration
function CloneNode(deep: Boolean; ACloneOwner: TDOMDocument): TDOMNode
; override; overloadArguments
deep | Indicates if the entire DOM sub-tree is copied for the DOM Element. |
ACloneOwner | DOM Document that owns the new Node(s) created in the method. |
Function result
DOM Node created in the method.
Description
CloneNode is an overridden
TDOMNode function in
TDOMElement. It re-implements the method from the ancestor class
to create a cloned copy of the DOM Element and its Attributes in the DOM
Document specified in the
ACloneOwner argument.
The cloning mechanism differs depending on whether ACloneOwner and
OwnerDocument are the same TDOMDocument instance.
Essentially, namespace information in the NSI property is reused
when the document instances are the same, and only default attributes are
cloned when the documents differ.
When deep is set to True, the CloneChildren
method is called to recursively copy the ChildNodes for the
Element.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
