[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'Laz2_DOM' (#lazutils)

TDOMNode.AppendChild

Appends the specified node as a child in the current node.

Declaration

Source position: laz2_dom.pas line 283

public function TDOMNode.AppendChild(

  NewChild: TDOMNode

):TDOMNode;

Arguments

NewChild

  

DOM Node to append in the method.

Function result

New DOM Node appended as a child node.

Description

AppendChild is a TDOMNode function used to append the node specified in NewChild as a child node in the hierarchy for the current class instance. AppendChild calls the InsertBefore method to make the specified node the first child node in the DOM hierarchy.

The return value contains the TDOMNode instance in NewChild after the node relationship in ParentNode, FirstChild, PreviousSibling, and NextSibling have been updated.

Remark: lnsertBefore always raises an EDOMHierarchyRequest exception in TDOMNode. It is overridden in descendent classes to perform actions needed for a DOM node specialization when the AppendChild method is called.

See also

TDOMNode.InsertBefore

  

Inserts a new child node immediately before the reference child node.

TDOMNode.ParentNode

  

DOM node that is the immediate ancestor of this node.

TDOMNode.FirstChild

  

Gets the first child node for the current node.

TDOMNode.PreviousSibling

  

Previous DOM Node at the same level in the DOM tree.

TDOMNode.NextSibling

  

Next DOM Node at the same level in the DOM tree.

EDOMHierarchyRequest

  

Exception raised when an inserted node is not valid for the Document Object Model (DOM).


Version 3.2 Generated 2024-02-25 Home