org.w3c.dom.Text.replaceWholeText
method
public replaceWholeText(content as String) as Text throws DOMException
Description

Replaces all logically adjacent text with the given content.

Parameters
  • content Replacement content.
Returns

Replacement text node, or null when content is empty.

Throws
  • DOMException if replacement fails.
Example
text.replaceWholeText("new text")