replaceWholeText
Summary
Replaces the text of the current object.
Syntax
var textNode = textNode.replaceWholeText(/* see parameter list */);
Parameters
text
- Data-type
- String
The text that replaces the existing text.
Return Value
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.
Notes
Obsolete
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.
Related specifications
- DOM Level 3 Core
- Recommendation
- DOM
- Living Standard
Attributions
Mozilla Developer Network : [Text.replaceWholeText Article]
Microsoft Developer Network: [replaceWholeText Method Article]