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

TDOMDocument.InsertBefore

Inserts a DOM Node prior to the reference DOM node.

Declaration

Source position: laz2_dom.pas line 501

public function TDOMDocument.InsertBefore(

  NewChild: TDOMNode;

  RefChild: TDOMNode

):TDOMNode; override;

Arguments

NewChild

  

New DOM Node to include in the document.

RefChild

  

Reference DOM Node that determines the location for the new DOM node.

Function result

DOM Node inserted in the method.

Description

InsertBefore is an overridden method in TDOMDocument used to insert the DOM node specified in NewChild immediately before the node specified in RefChild.

InsertBefore checks the NodeType property in NewChild to ensure that the operation is valid for the node type. An EDOMHierarchyRequest exception is raised for either of the following conditions:

InsertBefore calls the inherited method using NewChild and RefChild as arguments.

See also

TDOMNode_WithChildren.InsertBefore

  

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

TDOMNode.NodeType

  

Node type for the DOM Node.

EDOMHierarchyRequest

  

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


Version 3.2 Generated 2024-02-25 Home