Name

replaceWholeText: content(3)

Synopsis

This is a convenience method for replacing multiple adjacent text nodes with a single node that will contain the text passed in the content argument. The method returns a reference to the Text node that received the new content, or null if content contained a zero-length string.

Argument

content: DOMString

New text content to be used for replacement.

Exceptions

NO_MODIFICATION_ALLOWED_ERR

Raised if the element is read-only.

Get XML in a Nutshell, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.