Skip to content

Commit

Permalink
[giow] (2) Make document.close() more evil.
Browse files Browse the repository at this point in the history
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=7917

git-svn-id: http://svn.whatwg.org/webapps@4241 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Oct 21, 2009
1 parent d9aa72a commit 91d1f30
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 26 deletions.
30 changes: 21 additions & 9 deletions complete.html
Expand Up @@ -9923,16 +9923,28 @@ <h4 id=closing-the-input-stream><span class=secno>3.5.2 </span>Closing the input
</dl><div class=impl>

<p>The <dfn id=dom-document-close title=dom-document-close><code>close()</code></dfn>
method must throw an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception if the
<code>Document</code> object is not flagged as an <a href=#html-documents title="HTML
documents">HTML document</a>. Otherwise, if there is a
<a href=#script-created-parser>script-created parser</a> associated with the document,
then, when the method is called, the user agent must insert an
<a href=#explicit-eof-character>explicit "EOF" character</a> at the end of the parser's
<a href=#the-input-stream>input stream</a>. Otherwise, the method must do
nothing.</p>
method must run the following steps:</p>

</div>
<ol><li><p>If the <code>Document</code> object is not flagged as an
<a href=#html-documents title="HTML documents">HTML document</a>, throw an
<code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception and abort these
steps.</li>

<li><p>If there is no <a href=#script-created-parser>script-created parser</a> associated
with the document, then abort these steps.</li>

<li><p>Insert an <a href=#explicit-eof-character>explicit "EOF" character</a> at the end
of the parser's <a href=#the-input-stream>input stream</a>.</li>

<li><p>If there is a <a href=#pending-parsing-blocking-script>pending parsing-blocking script</a>,
then abort these steps.</li>

<li><p>Run the tokenizer, processing resulting tokens as they are
emitted, and stopping when the tokenizer reaches the <a href=#explicit-eof-character>explicit
"EOF" character</a> or <a href=#spin-the-event-loop title="spin the event loop">spins
the event loop</a>.</li>

</ol></div>



Expand Down
30 changes: 21 additions & 9 deletions index
Expand Up @@ -9753,16 +9753,28 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%0
</dl><div class=impl>

<p>The <dfn id=dom-document-close title=dom-document-close><code>close()</code></dfn>
method must throw an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception if the
<code>Document</code> object is not flagged as an <a href=#html-documents title="HTML
documents">HTML document</a>. Otherwise, if there is a
<a href=#script-created-parser>script-created parser</a> associated with the document,
then, when the method is called, the user agent must insert an
<a href=#explicit-eof-character>explicit "EOF" character</a> at the end of the parser's
<a href=#the-input-stream>input stream</a>. Otherwise, the method must do
nothing.</p>
method must run the following steps:</p>

</div>
<ol><li><p>If the <code>Document</code> object is not flagged as an
<a href=#html-documents title="HTML documents">HTML document</a>, throw an
<code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception and abort these
steps.</li>

<li><p>If there is no <a href=#script-created-parser>script-created parser</a> associated
with the document, then abort these steps.</li>

<li><p>Insert an <a href=#explicit-eof-character>explicit "EOF" character</a> at the end
of the parser's <a href=#the-input-stream>input stream</a>.</li>

<li><p>If there is a <a href=#pending-parsing-blocking-script>pending parsing-blocking script</a>,
then abort these steps.</li>

<li><p>Run the tokenizer, processing resulting tokens as they are
emitted, and stopping when the tokenizer reaches the <a href=#explicit-eof-character>explicit
"EOF" character</a> or <a href=#spin-the-event-loop title="spin the event loop">spins
the event loop</a>.</li>

</ol></div>



Expand Down
32 changes: 24 additions & 8 deletions source
Expand Up @@ -10120,14 +10120,30 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%0
<div class="impl">

<p>The <dfn title="dom-document-close"><code>close()</code></dfn>
method must throw an <code>INVALID_STATE_ERR</code> exception if the
<code>Document</code> object is not flagged as an <span title="HTML
documents">HTML document</span>. Otherwise, if there is a
<span>script-created parser</span> associated with the document,
then, when the method is called, the user agent must insert an
<span>explicit "EOF" character</span> at the end of the parser's
<span>input stream</span>. Otherwise, the method must do
nothing.</p>
method must run the following steps:</p>

<ol>

<li><p>If the <code>Document</code> object is not flagged as an
<span title="HTML documents">HTML document</span>, throw an
<code>INVALID_STATE_ERR</code> exception and abort these
steps.</p></li>

<li><p>If there is no <span>script-created parser</span> associated
with the document, then abort these steps.</p></li>

<li><p>Insert an <span>explicit "EOF" character</span> at the end
of the parser's <span>input stream</span>.</p></li>

<li><p>If there is a <span>pending parsing-blocking script</span>,
then abort these steps.</p></li>

<li><p>Run the tokenizer, processing resulting tokens as they are
emitted, and stopping when the tokenizer reaches the <span>explicit
"EOF" character</span> or <span title="spin the event loop">spins
the event loop</span>.</p></li>

</ol>

</div>

Expand Down

0 comments on commit 91d1f30

Please sign in to comment.