This page is Almost Ready

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

replaceWholeText

Summary

Replaces the text of the current object.

Method of dom/Textdom/Text

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