@@ -9174,7 +9174,7 @@ partial interface <dfn id="document" data-lt="">Document</dfn> {
9174
9174
readonly attribute <span>HTMLOrSVGScriptElement</span>? <span data-x="dom-document-currentScript">currentScript</span>; // classic scripts in a document tree only
9175
9175
9176
9176
// <span>dynamic markup insertion</span>
9177
- [<span>CEReactions</span>] <span>Document</span> <span data-x="dom-document-open">open</span>(optional DOMString type = "text/html" , optional DOMString replace = "");
9177
+ [<span>CEReactions</span>] <span>Document</span> <span data-x="dom-document-open">open</span>(optional DOMString type, optional DOMString replace = ""); // type is ignored
9178
9178
<span>WindowProxy</span> <span data-x="dom-document-open">open</span>(USVString url, DOMString name, DOMString features);
9179
9179
[<span>CEReactions</span>] void <span data-x="dom-document-close">close</span>();
9180
9180
[<span>CEReactions</span>] void <span data-x="dom-document-write">write</span>(DOMString... text);
@@ -90577,19 +90577,14 @@ document.body.appendChild(frame)</pre>
90577
90577
with different numbers of arguments.</p>
90578
90578
90579
90579
<dl class="domintro">
90580
-
90581
90580
<dt><var>document</var> = <var>document</var> . <code subdfn data-x="dom-document-open">open</code>( [ <var>type</var> [, <var>replace</var> ] ] )</dt>
90582
-
90583
90581
<dd>
90584
-
90585
90582
<p>Causes the <code>Document</code> to be replaced in-place, as if it was a new
90586
90583
<code>Document</code> object, but reusing the previous object, which is then returned.</p>
90587
90584
90588
- <p>If the <var>type</var> argument is omitted or has the value
90589
- "<code>text/html</code>", then the resulting <code>Document</code> has an HTML parser associated
90590
- with it, which can be given data to parse using <code
90591
- data-x="dom-document-write">document.write()</code>. Otherwise, all content passed to <code
90592
- data-x="dom-document-write">document.write()</code> will be parsed as plain text.</p>
90585
+ <p>The resulting <code>Document</code> has an HTML parser associated with it, which can be given
90586
+ data to parse using <code data-x="dom-document-write">document.write()</code>. (The
90587
+ <var>type</var> argument is ignored.)</p>
90593
90588
90594
90589
<p>If the <var>replace</var> argument is present and has the value "<code
90595
90590
data-x="">replace</code>", the existing entries in the session history for the
@@ -90602,17 +90597,10 @@ document.body.appendChild(frame)</pre>
90602
90597
90603
90598
<p>Throws an <span>"<code>InvalidStateError</code>"</span> <code>DOMException</code> if the
90604
90599
parser is currently executing a <span>custom element constructor</span>.</p>
90605
-
90606
90600
</dd>
90607
90601
90608
90602
<dt><var>window</var> = <var>document</var> . <code data-x="dom-document-open">open</code>( <var>url</var>, <var>name</var>, <var>features</var> )</dt>
90609
-
90610
- <dd>
90611
-
90612
- <p>Works like the <code data-x="dom-open">window.open()</code> method.</p>
90613
-
90614
- </dd>
90615
-
90603
+ <dd><p>Works like the <code data-x="dom-open">window.open()</code> method.</p></dd>
90616
90604
</dl>
90617
90605
90618
90606
<div w-nodev>
@@ -90623,8 +90611,8 @@ document.body.appendChild(frame)</pre>
90623
90611
unloaded</span>. Initially, the counter must be set to zero.</p> <!--
90624
90612
https://www.hixie.ch/tests/adhoc/dom/level0/document/open/unload/ -->
90625
90613
90626
- <p>The <dfn>document open steps</dfn>, given a <var>document</var>, <var>type </var>, and
90627
- <var>replaceInput</var>, are as follows:</p>
90614
+ <p>The <dfn>document open steps</dfn>, given a <var>document</var> and <var>replaceInput </var>,
90615
+ are as follows:</p>
90628
90616
90629
90617
<ol>
90630
90618
<li><p>If <var>document</var> is an <span data-x="XML documents">XML document</span>, then throw
@@ -90770,41 +90758,6 @@ document.body.appendChild(frame)</pre>
90770
90758
<li><p>Set the <span>current document readiness</span> of <var>document</var> to "<code
90771
90759
data-x="">loading</code>".</p></li>
90772
90760
90773
- <li>
90774
-
90775
- <!-- text/plain handling -->
90776
-
90777
- <p>If <var>type</var> is an <span>ASCII case-insensitive</span> match for the string
90778
- "<code data-x="">replace</code>", then, for historical reasons, set it to the string "<code
90779
- data-x="">text/html</code>".</p>
90780
-
90781
- <p>Otherwise:</p>
90782
-
90783
- <p>If the <var>type</var> string contains a U+003B SEMICOLON character (;), remove the
90784
- first such character and all characters from it up to the end of the string.</p>
90785
-
90786
- <p><span>Strip leading and trailing ASCII whitespace</span> from <var>type</var>.</p>
90787
-
90788
- </li>
90789
-
90790
- <li>
90791
-
90792
- <p>If <var>type</var> is <em>not</em> now an <span>ASCII case-insensitive</span> match
90793
- for the string "<code>text/html</code>", then act as if the tokenizer had emitted a start tag
90794
- token with the tag name "pre" followed by a single U+000A LINE FEED (LF) character<!-- to get
90795
- eaten, so that a leading LF in the written text doesn't get eaten itself-->, then switch the
90796
- <span>HTML parser</span>'s tokenizer to the <span>PLAINTEXT state</span>.</p>
90797
-
90798
- <!--
90799
- https://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E...%3Ciframe%3E%3C%2Fiframe%3E%3Cscript%3Eonload%20%3D%20function%20()%20%7B%20%0D%0A%20%20var%20d%20%3D%20document.getElementsByTagName('iframe')%5B0%5D.contentDocument%3B%0D%0A%20%20d.open('image%2Fsvg%2Bxml')%3B%0D%0A%20%20d.write(%22%3Cinput%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml'%20value%3D'(x)html'%2F%3E%22)%3B%0D%0A%20%20d.close()%3B%0D%0A%7D%3B%3C%2Fscript%3E
90800
- https://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E...%3Ciframe%3E%3C%2Fiframe%3E%3Cscript%3Eonload%20%3D%20function%20()%20%7B%20%0D%0A%20%20var%20d%20%3D%20document.getElementsByTagName('iframe')%5B0%5D.contentDocument%3B%0D%0A%20%20d.open('image%2Fgif')%3B%0D%0A%20%20var%20a%20%3D%20%5B%200x47%2C%200x49%2C%200x46%2C%200x38%2C%200x39%2C%200x61%2C%200x01%2C%200x00%2C%200x01%2C%200x00%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%200x80%2C%200xff%2C%200x00%2C%200xc0%2C%200xc0%2C%200xc0%2C%200x00%2C%200x00%2C%200x00%2C%200x21%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%200xf9%2C%200x04%2C%200x01%2C%200x00%2C%200x00%2C%200x00%2C%200x00%2C%200x2c%2C%200x00%2C%200x00%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%200x00%2C%200x00%2C%200x01%2C%200x00%2C%200x01%2C%200x00%2C%200x00%2C%200x02%2C%200x02%2C%200x44%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%200x01%2C%200x00%2C%200x3b%20%5D%3B%0D%0A%20%20var%20s%20%3D%20%22%22%3B%0D%0A%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20a.length%3B%20i%20%2B%3D%201)%0D%0A%20%20%20%20s%20%2B%3D%20String.fromCharCode(a%5Bi%5D)%3B%0D%0A%20%20d.write(s)%3B%0D%0A%20%20d.close()%3B%0D%0A%7D%3B%3C%2Fscript%3E
90801
- https://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E...%3Ciframe%3E%3C%2Fiframe%3E%3Cscript%3Eonload%20%3D%20function%20()%20{%20%0A%20%20var%20d%20%3D%20document.getElementsByTagName(%27iframe%27)[0].contentDocument%3B%0A%20%20d.open(%27Text%2Fplain%27)%3B%0A%20%20d.write(%27%3Cb%3Etest%27)%3B%0A%20%20d.close()%3B%0A}%3B%3C%2Fscript%3E
90802
- https://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E...%3Ciframe%3E%3C%2Fiframe%3E%3Cscript%3Eonload%20%3D%20function%20()%20{%20%0A%20%20var%20d%20%3D%20document.getElementsByTagName(%27iframe%27)[0].contentDocument%3B%0A%20%20d.open(%27%20text%2Fplain%27)%3B%0A%20%20d.write(%27%3Cb%3Etest%27)%3B%0A%20%20d.close()%3B%0A}%3B%3C%2Fscript%3E
90803
- https://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E...%3Ciframe%3E%3C%2Fiframe%3E%3Cscript%3Eonload%20%3D%20function%20()%20{%20%0A%20%20var%20d%20%3D%20document.getElementsByTagName(%27iframe%27)[0].contentDocument%3B%0A%20%20d.open(%27text%2Fplain%3B%27)%3B%0A%20%20d.write(%27%3Cb%3Etest%27)%3B%0A%20%20d.close()%3B%0A}%3B%3C%2Fscript%3E
90804
- -->
90805
-
90806
- </li>
90807
-
90808
90761
<li><p>Remove any <span data-x="concept-task">tasks</span> queued by the <span>history traversal
90809
90762
task source</span> that are associated with any <code>Document</code> objects in the
90810
90763
<span>top-level browsing context</span>'s <span>document family</span>.</p></li>
@@ -90841,10 +90794,11 @@ document.body.appendChild(frame)</pre>
90841
90794
<p>When invoked with two arguments or fewer, the <code
90842
90795
data-x="dom-document-open">document.open(<var>type</var>, <var>replace</var>)</code> method must
90843
90796
return the result of running the <span>document open steps</span> with this <code>Document</code>
90844
- object, <var>type</var>, and <var>replace</var>.
90797
+ object and <var>replace</var>.
90845
90798
90846
- <p class="note">The <code data-x="dom-document-open">document.open()</code> method does not affect
90847
- whether a <code>Document</code> is <span>ready for post-load tasks</span> or <span>completely
90799
+ <p class="note">The <var>type</var> argument is ignored. Also, the <code
90800
+ data-x="dom-document-open">document.open()</code> method does not affect whether a
90801
+ <code>Document</code> is <span>ready for post-load tasks</span> or <span>completely
90848
90802
loaded</span>.</p>
90849
90803
90850
90804
<p>When invoked with three arguments, the <code data-x="dom-document-open">open(<var>url</var>,
@@ -90989,12 +90943,10 @@ document.body.appendChild(frame)</pre>
90989
90943
0 or <var>document</var>'s <span>ignore-destructive-writes counter</span> is greater than 0,
90990
90944
then return.</p></li>
90991
90945
90992
- <li><p>Run the <span>document open steps</span> with <var>document</var>, "<code
90993
- data-x="">text/html</code>", and the empty string. If the user <span>refused to allow the
90994
- document to be unloaded</span>, then return. Otherwise, the <span>insertion
90995
- point</span> will point at just before the end of the (empty) <span>input
90946
+ <li><p>Run the <span>document open steps</span> with <var>document</var> and the empty string.
90947
+ If the user <span>refused to allow the document to be unloaded</span>, then return. Otherwise,
90948
+ the <span>insertion point</span> will point at just before the end of the (empty) <span>input
90996
90949
stream</span>.</p></li>
90997
- <!-- The second and third argument passed above are the defaults per document.open()'s IDL. -->
90998
90950
</ol>
90999
90951
</li>
91000
90952
0 commit comments