Name

Document.createCDATASection( ): create a new CDATASection node — DOM Level 1 Core:

Synopsis

CDATASection createCDATASection(Stringdata)
    throws DOMException;

Arguments

data

The text of the CDATASection to create.

Returns

A newly created CDATASection node, with the specified data as its contents.

Throws

If the document is an HTML document, this method throws a DOMException with a code of NOT_SUPPORTED_ERR because HTML documents do not allow CDATASection nodes.

Get JavaScript: The Definitive Guide, 5th 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.