Replaces the text of the current object.
var textNode = textNode.replaceWholeText(/* see parameter list */);
The text that replaces the existing text.
Returns an object of type DOM NodeDOM Node
A Text node that received the replacement text. If the replaced text was empty, this value will be null. If the current node is read-only, a new Text node is returned. If the current node is not read-only, the same object is returned.
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
- DOM Level 3 Core
- Living Standard
Mozilla Developer Network : [Text.replaceWholeText Article]
Microsoft Developer Network: [replaceWholeText Method Article]