TDOMDocument.InsertBefore function
Inserts a DOM Node prior to the reference DOM node.
Declaration
function InsertBefore(NewChild: TDOMNode; RefChild: TDOMNode): TDOMNode
; overrideArguments
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:
- NewChild is a DOM Element node and the
DocumentElementhas already been assigned. - NewChild is a DOM DocumentType node and the
DocTypeproperty has already been assigned.
InsertBefore calls the inherited method using NewChild and RefChild as arguments.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
