TDOMNode_WithChildren.SetTextContent procedure
Sets the value for the TextContent property.
Declaration
procedure SetTextContent(const AValue: DOMString); overrideArguments
AValue | New value for the TextContent property. |
Description
SetTextContent is a overridden method used to set the
TextContent property to the value specified in AValue. TextContent
is the textual representation of the content for the node as a single
TDOMText child node.
SetTextContent calls the Changing method to ensure that the node
does not have the value nfReadonly in its Flags
property. An EDOMError exception is raised with the
NO_MODIFICATION_ALLOWED_ERR constant if the node is marked as
read-only.
SetTextContent removes existing ChildNodes by calling
DetachChild until FirstChild is no longer assigned.
If AValue is not an empty string (''), the
OwnerDocument is used to create a TDOMText node with the specified
value. The new text node is added to ChildNodes using the
AppendChild method.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
