Skip to content

Commit

Permalink
[giow] (2) Make the readyState change, the 'readystatechange' event, …
Browse files Browse the repository at this point in the history
…and the 'load' event all happen synchronously in the same task so that you can check readyState to know whether you still have to attach an 'onload' event handler.

Affected topics: HTML Syntax and Parsing

git-svn-id: http://svn.whatwg.org/webapps@6882 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jan 10, 2012
1 parent 0bb932c commit fff7b28
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 26 deletions.
15 changes: 6 additions & 9 deletions complete.html
Expand Up @@ -240,7 +240,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 9 January 2012</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 10 January 2012</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
Expand Down Expand Up @@ -87967,14 +87967,11 @@ <h4 id=the-end><span class=secno>12.2.6 </span>The end</h4>
the <code><a href=#document>Document</a></code>.</li>

<li><p><a href=#queue-a-task>Queue a task</a> to set the <a href=#current-document-readiness>current document
readiness</a> to "<code title="">complete</code>". <!-- this also fires an event
synchronously during the task --></li>

<li><p>If the <code><a href=#document>Document</a></code> is in a <a href=#browsing-context>browsing
context</a>, then <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a
simple event</a> named <code title=event-load>load</code> at
the <code><a href=#document>Document</a></code>'s <code><a href=#window>Window</a></code> object, but with
its <code title=dom-event-target><a href=#dom-event-target>target</a></code> set to the
readiness</a> to "<code title="">complete</code>"<!-- this also
fires an event synchronously during the task -->, and then, if the
<code><a href=#document>Document</a></code> is in a <a href=#browsing-context>browsing context</a>, to
<a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-load>load</code> at the <code><a href=#document>Document</a></code>'s
<code><a href=#window>Window</a></code> object, but with its <code title=dom-event-target><a href=#dom-event-target>target</a></code> set to the
<code><a href=#document>Document</a></code> object (and the <code title=dom-event-currentTarget>currentTarget</code> set to the
<code><a href=#window>Window</a></code> object).</li>

Expand Down
15 changes: 6 additions & 9 deletions index
Expand Up @@ -240,7 +240,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 9 January 2012</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 10 January 2012</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
Expand Down Expand Up @@ -87967,14 +87967,11 @@ document.body.appendChild(text);
the <code><a href=#document>Document</a></code>.</li>

<li><p><a href=#queue-a-task>Queue a task</a> to set the <a href=#current-document-readiness>current document
readiness</a> to "<code title="">complete</code>". <!-- this also fires an event
synchronously during the task --></li>

<li><p>If the <code><a href=#document>Document</a></code> is in a <a href=#browsing-context>browsing
context</a>, then <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a
simple event</a> named <code title=event-load>load</code> at
the <code><a href=#document>Document</a></code>'s <code><a href=#window>Window</a></code> object, but with
its <code title=dom-event-target><a href=#dom-event-target>target</a></code> set to the
readiness</a> to "<code title="">complete</code>"<!-- this also
fires an event synchronously during the task -->, and then, if the
<code><a href=#document>Document</a></code> is in a <a href=#browsing-context>browsing context</a>, to
<a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-load>load</code> at the <code><a href=#document>Document</a></code>'s
<code><a href=#window>Window</a></code> object, but with its <code title=dom-event-target><a href=#dom-event-target>target</a></code> set to the
<code><a href=#document>Document</a></code> object (and the <code title=dom-event-currentTarget>currentTarget</code> set to the
<code><a href=#window>Window</a></code> object).</li>

Expand Down
15 changes: 7 additions & 8 deletions source
Expand Up @@ -101810,14 +101810,13 @@ document.body.appendChild(text);
the <code>Document</code>.</p></li>

<li><p><span>Queue a task</span> to set the <span>current document
readiness</span> to "<code title="">complete</code>". <!-- this also fires an event
synchronously during the task --></p></li>

<li><p>If the <code>Document</code> is in a <span>browsing
context</span>, then <span>queue a task</span> to <span>fire a
simple event</span> named <code title="event-load">load</code> at
the <code>Document</code>'s <code>Window</code> object, but with
its <code title="dom-event-target">target</code> set to the
readiness</span> to "<code title="">complete</code>"<!-- this also
fires an event synchronously during the task -->, and then, if the
<code>Document</code> is in a <span>browsing context</span>, to
<span>fire a simple event</span> named <code
title="event-load">load</code> at the <code>Document</code>'s
<code>Window</code> object, but with its <code
title="dom-event-target">target</code> set to the
<code>Document</code> object (and the <code
title="dom-event-currentTarget">currentTarget</code> set to the
<code>Window</code> object).</p></li>
Expand Down

0 comments on commit fff7b28

Please sign in to comment.