JavaScript: The Definitive Guide

25.61. Document.createCDATASection( ): create a new CDATASection node

DOM Level 1 Core:

25.61.1. Synopsis

CDATASection createCDATASection(String data) tHRows DOMException;

25.61.1.1. Arguments

data

The text of the CDATASection to create.

25.61.1.2. Returns

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

25.61.1.3. 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.

Категории