@@ -3400,7 +3400,7 @@ interface Node : EventTarget {
3400
3400
const unsigned short ELEMENT_NODE = 1;
3401
3401
const unsigned short ATTRIBUTE_NODE = 2; // historical
3402
3402
const unsigned short TEXT_NODE = 3;
3403
- const unsigned short CDATA_SECTION_NODE = 4; // historical
3403
+ const unsigned short CDATA_SECTION_NODE = 4;
3404
3404
const unsigned short ENTITY_REFERENCE_NODE = 5; // historical
3405
3405
const unsigned short ENTITY_NODE = 6; // historical
3406
3406
const unsigned short PROCESSING_INSTRUCTION_NODE = 7;
@@ -3489,6 +3489,9 @@ that is a <a>document</a>.
3489
3489
<dd><var> node</var> is a {{Text}}
3490
3490
<a>node</a> .
3491
3491
3492
+ <dt><code> {{Node}} . {{Node/CDATA_SECTION_NODE}} </code> (4)
3493
+ <dd><var> node</var> is a {{CDATASection}} <a>node</a> .
3494
+
3492
3495
<dt><code> {{Node}} . {{Node/PROCESSING_INSTRUCTION_NODE}} </code> (7)
3493
3496
<dd><var> node</var> is a {{ProcessingInstruction}}
3494
3497
<a>node</a> .
@@ -3553,9 +3556,8 @@ the first matching statement, switching on the <a>context object</a>:
3553
3556
<dt> {{Text}}
3554
3557
<dd> <dfn const for=Node>TEXT_NODE</dfn> (3);
3555
3558
3556
- <!-- XXX CDATA
3557
- <dfn const for=Node>CDATA_SECTION_NODE</dfn> (4, historical);
3558
- -->
3559
+ <dt> {{CDATASection}}
3560
+ <dd> <dfn const for=Node>CDATA_SECTION_NODE</dfn> (4);
3559
3561
3560
3562
<dt> {{ProcessingInstruction}}
3561
3563
<dd> <dfn const for=Node>PROCESSING_INSTRUCTION_NODE</dfn> (7);
@@ -4546,6 +4548,7 @@ interface Document : Node {
4546
4548
[NewObject] Element createElementNS(DOMString? namespace, DOMString qualifiedName, optional ElementCreationOptions options);
4547
4549
[NewObject] DocumentFragment createDocumentFragment();
4548
4550
[NewObject] Text createTextNode(DOMString data);
4551
+ [NewObject] CDATASection createCDATASection(DOMString data);
4549
4552
[NewObject] Comment createComment(DOMString data);
4550
4553
[NewObject] ProcessingInstruction createProcessingInstruction(DOMString target, DOMString data);
4551
4554
@@ -4868,6 +4871,9 @@ for the <a>context object</a>.
4868
4871
<dd> Returns a {{Text}} <a>node</a>
4869
4872
whose <a>data</a> is <var> data</var> .
4870
4873
4874
+ <dt><code><var> text</var> = <var> document</var> . {{createCDATASection(data)}} </code>
4875
+ <dd> Returns a {{CDATASection}} <a>node</a> whose <a>data</a> is <var> data</var> .
4876
+
4871
4877
<dt><code><var> comment</var> = <var> document</var> . {{createComment(data)}} </code>
4872
4878
<dd> Returns a {{Comment}} <a>node</a>
4873
4879
whose <a>data</a> is <var> data</var> .
@@ -4974,6 +4980,20 @@ invoked, must return a new {{Text}} <a>node</a> with its <a>data</a> set to <var
4974
4980
<p class="note no-backref"> No check is performed that <var> data</var> consists of
4975
4981
characters that match the <code> <a type>Char</a> </code> production.
4976
4982
4983
+ <p> The <dfn method for=Document><code>createCDATASection(<var>data</var>)</code></dfn> method, when
4984
+ invoked, must run these steps:
4985
+
4986
+ <ol>
4987
+ <li><p> If <a>context object</a> is an <a>HTML document</a> , then <a>throw</a> a
4988
+ {{NotSupportedError}} .
4989
+
4990
+ <li><p> If <var> data</var> contains the string "<code> ]]></code> ", then <a>throw</a> an
4991
+ {{InvalidCharacterError}} .
4992
+
4993
+ <li><p> Return a new {{CDATASection}} <a>node</a> with its <a>data</a> set to <var> data</var> and
4994
+ <a>node document</a> set to the <a>context object</a> .
4995
+ </ol>
4996
+
4977
4997
The <dfn method for=Document><code>createComment(<var>data</var>)</code></dfn> method, when invoked,
4978
4998
must return a new {{Comment}} <a>node</a> with its <a>data</a> set to <var> data</var> and
4979
4999
<a>node document</a> set to the <a>context object</a> .
@@ -7108,6 +7128,15 @@ attribute must return a concatenation of the
7108
7128
7109
7129
7110
7130
7131
+ <h3 id=interface-cdatasection>Interface {{CDATASection}}</h3>
7132
+
7133
+ <pre class=idl>
7134
+ [Exposed=Window]
7135
+ interface CDATASection : Text {
7136
+ };</pre>
7137
+
7138
+
7139
+
7111
7140
<h3 id='interface-processinginstruction'>Interface {{ProcessingInstruction}}</h3>
7112
7141
7113
7142
<pre class=idl>
@@ -9315,7 +9344,7 @@ callback interface NodeFilter {
9315
9344
const unsigned long SHOW_ELEMENT = 0x1;
9316
9345
const unsigned long SHOW_ATTRIBUTE = 0x2; // historical
9317
9346
const unsigned long SHOW_TEXT = 0x4;
9318
- const unsigned long SHOW_CDATA_SECTION = 0x8; // historical
9347
+ const unsigned long SHOW_CDATA_SECTION = 0x8;
9319
9348
const unsigned long SHOW_ENTITY_REFERENCE = 0x10; // historical
9320
9349
const unsigned long SHOW_ENTITY = 0x20; // historical
9321
9350
const unsigned long SHOW_PROCESSING_INSTRUCTION = 0x40;
@@ -9354,9 +9383,7 @@ These constants can be used for the
9354
9383
<li> <dfn const for="NodeFilter">SHOW_ATTRIBUTE</dfn> (2, historical);
9355
9384
-->
9356
9385
<li> <dfn const for="NodeFilter">SHOW_TEXT</dfn> (4);
9357
- <!-- XXX still questionable
9358
- <li> <dfn const for="NodeFilter">SHOW_CDATA_SECTION</dfn> (8; historical);
9359
- -->
9386
+ <li> <dfn const for="NodeFilter">SHOW_CDATA_SECTION</dfn> (8);
9360
9387
<li> <dfn const for="NodeFilter">SHOW_PROCESSING_INSTRUCTION</dfn> (64, 40 in hexadecimal);
9361
9388
<li> <dfn const for="NodeFilter">SHOW_COMMENT</dfn> (128, 80 in hexadecimal);
9362
9389
<li> <dfn const for="NodeFilter">SHOW_DOCUMENT</dfn> (256, 100 in hexadecimal);
@@ -9706,7 +9733,6 @@ some of these features should be reintroduced.
9706
9733
9707
9734
Interfaces:
9708
9735
<ul class=brief dfn-type="interface">
9709
- <li> <dfn><code>CDATASection</code></dfn>
9710
9736
<li> <dfn><code>DOMConfiguration</code></dfn>
9711
9737
<li> <dfn><code>DOMError</code></dfn>
9712
9738
<li> <dfn><code>DOMErrorHandler</code></dfn>
@@ -9738,7 +9764,6 @@ Interface members:
9738
9764
<dt> {{Document}}
9739
9765
<dd>
9740
9766
<ul class=brief>
9741
- <li> <dfn method for=Document>createCDATASection()</dfn>
9742
9767
<li> <dfn method for=Document>createEntityReference()</dfn>
9743
9768
<li> <dfn attribute for=Document>xmlEncoding</dfn>
9744
9769
<li> <dfn attribute for=Document>xmlStandalone</dfn>
0 commit comments