Sign in Join
FPDoc Onlineexperiment

TDOMNode.CloneNode function

Member of TDOMNodepublicIn unit Laz2_DOM

Makes a copy of the DOM node.

Declaration

pascal
function CloneNode(deep: Boolean): TDOMNode; overload
function CloneNode(deep: Boolean; ACloneOwner: TDOMDocument): TDOMNode
 ; virtual; overload

Arguments

deep

Indicates if child nodes are included in the cloned node.

ACloneOwner

DOM Document used to created the new DOM Node.

Function result

DOM node created in the method.

Description

CloneNode is an overloaded TDOMNode function used to make a new copy of the current node. Deep indicates that child nodes are included in the new TDOMNode instance when set to True. An overloaded variant allows the DOM Document which owns the new node to be specified.

CloneNode always raises an EDOMNotSupported exception in TDOMNode, and the return value is always Nil. It must be overridden in a descendent class to perform any actions needed for the DOM node specialization.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.