This page is Ready to Use

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

appendData

Summary

Appends a string to the end of the character data.

Method of dom/CharacterDatadom/CharacterData

Syntax

 textualNode.appendData(text);

Parameters

text

Data-type
String

The new character string.

Return Value

No return value

Examples

//create text node
var phrase = document.createTextNode("A flawed plan today");
//append string to node (note initial space)
phrase.appendData(" is better than a perfect plan tomorrow.");

Related specifications

DOM Level 3 Core
Recommendation

Attributions