TDOMNode_WithChildren.GetTextContent function
Gets the value for the TextContent property.
Declaration
function GetTextContent: DOMString; overrideFunction 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
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
