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

TDOMNode_WithChildren.GetTextContent

Gets the value for the TextContent property.

Declaration

Source position: laz2_dom.pas line 324

protected function TDOMNode_WithChildren.GetTextContent: DOMString; override;

Function result

Value for the TextContent property.

Description

GetTextContent is an overridden method in TDOMNode_WithChildren used to get the value for the TextContent property. It re-implements the method to ensure that child nodes are represented in the value for the property.

Child nodes are processed, start at FirstChild and continuing to the NextSibling for the child node. The NodeType property for each child node is used to determine the actions needed for the node type. For example:

TEXT_NODE
Casts the child node to TDOMText and appends its Data to the value for the property (when it is not ignorable whitespace).
COMMENT_NODE, PROCESSING_INSTRUCTION_NODE
These child node types are omitted from the property value.
Other NodeTypes
The TextContent property for the child node is appended to the property value.

See also

TDOMNode.TextContent

  

Textual representation for the DOM Node.


Version 3.2 Generated 2024-02-25 Home