createCDATASection (W3C DOM Core method)
var cdata = document.createCDATASection ('<p>Good relations have I with the Wookies</p>'); element.appendChild(cdata);
So if the
element in question were an empty RSS
Then the operation above would result in this
<description><![CDATA[<p>Good relations have I with the Wookies</p>]]></description>
- data (
The data for the CDATA section.
CDATASection node in an XML document, with the specified
The created CDATA section node.
says that this method should throw a
in HTML mode1 (code 9:
Therefore if a browser supports it and does not throw an exception in that
mode, this is considered a bug, and is what happens in
Opera and Safari 1.3 and
In Internet Explorer in HTML this method
is not implemented (it returns undefined). Similarly to the previous
note, this cannot be considered a bug or lack of support because
CDATASection is an XML construct.
1 On XHTML or HTML pages served as
There are no comments yet.