Skip to content

Commit

Permalink
[] (0) more tweaking around to make scripts execute appropriately
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@640 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Feb 28, 2007
1 parent c863d59 commit 361dc8e
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 36 deletions.
39 changes: 24 additions & 15 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -16484,9 +16484,6 @@ interface <dfn id=imagedata>ImageData</dfn> {
parser resumes</a> (amazingly enough).</p>
</dl>

<p class=big-issue><!-- XXX --> need to say, in the part of the spec that
fires the onload event, that the list above is triggered.

<p><dfn id=executing title="executing a script block">Executing a script
block</dfn>: If the load resulted in an error (for example a DNS error, or
an HTTP 404 error), then executing the script consists of doing nothing.
Expand Down Expand Up @@ -29905,11 +29902,12 @@ function receiver(e) {
insertion</a> APIs to insert characters into the stream being tokenised.)

<p>Before each step of the tokeniser, the user agent may check to see if
either one of the scripts in <span>the list of scripts that will execute
as soon as possible</span> or the first script in <span>the list of
scripts that will execute asynchronously</span>, has <span>completed
loading</span>. If one has, then it must be <a href="#executing"
title="executing a script block">executed</a> and removed from its list.
either one of the scripts in the <a href="#list-of1">list of scripts that
will execute as soon as possible</a> or the first script in the <a
href="#list-of0">list of scripts that will execute asynchronously</a>, has
<span>completed loading</span><!-- XXX xref -->. If one has, then it must
be <a href="#executing" title="executing a script block">executed</a> and
removed from its list.

<p>The tokeniser state machine is as follows:

Expand Down Expand Up @@ -33945,13 +33943,24 @@ Put the following into the MathML namespace if parsed:
rules for <a href="#when-a">when a script completes loading</a> start
applying (script execution is no longer managed by the parser).

<p>If the <a href="#list-of">list of scripts that will execute when the
document has finished parsing</a> is not empty, and the first item in this
list finished loading while the document was being parsed, then act as if
that script just finished loading. (This will cause the script to be
executed, along with any subsequent scripts in that list that are already
loaded, as described in the <code><a href="#script2">script</a></code>
element section.)
<p>If any of the scripts in the <a href="#list-of1">list of scripts that
will execute as soon as possible</a> have <span>completed
loading</span><!-- XXX xref -->, or if the <a href="#list-of0">list of
scripts that will execute asynchronously</a> is not empty and the first
script in that list has <span>completed loading</span><!-- XXX xref
-->,
then act as if those scripts just completed loading, following the rules
given for that in the <code><a href="#script2">script</a></code> element
definition.

<p>Then, if the <a href="#list-of">list of scripts that will execute when
the document has finished parsing</a> is not empty, and the first item in
this list has already <span>completed loading</span><!--XXX
xref -->,
then act as if that script just finished loading.

<p>By this point, there will be no scripts that have loaded but have not
yet been executed.

<p>Once everything that <dfn id=delays title="delay the load event">delays
the load event</dfn> has completed, the user agent must <a href="#firing4"
Expand Down
47 changes: 26 additions & 21 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -14565,10 +14565,6 @@ interface <dfn>ImageData</dfn> {

</dl>

<p class="big-issue"><!-- XXX --> need to say, in the part of the
spec that fires the onload event, that the list above is
triggered.</p>

<p><dfn title="executing a script block">Executing a script
block</dfn>: If the load resulted in an error (for example a DNS
error, or an HTTP 404 error), then executing the script consists of
Expand Down Expand Up @@ -27702,12 +27698,12 @@ function receiver(e) {
characters into the stream being tokenised.)</p>

<p>Before each step of the tokeniser, the user agent may check to
see if either one of the scripts in <span>the list of scripts that
will execute as soon as possible</span> or the first script in
<span>the list of scripts that will execute asynchronously</span>,
has <span>completed loading</span>. If one has, then it must be
<span title="executing a script block">executed</span> and removed
from its list.</li>
see if either one of the scripts in the <span>list of scripts that
will execute as soon as possible</span> or the first script in the
<span>list of scripts that will execute asynchronously</span>, has
<span>completed loading</span><!-- XXX xref -->. If one has, then it
must be <span title="executing a script block">executed</span> and
removed from its list.</li>

<p>The tokeniser state machine is as follows:</p>

Expand Down Expand Up @@ -31844,17 +31840,26 @@ Put the following into the MathML namespace if parsed:
title="event-DOMContentLoaded">DOMContentLoaded</code> event</span>
at <span>the <code>body</code> element</span>.</p>

<p>Then, -->the rules for <span>when a script completes loading</span>
start applying (script execution is no longer managed by the
parser).</p>

<p>If the <span>list of scripts that will execute when the document
has finished parsing</span> is not empty, and the first item in this
list finished loading while the document was being parsed, then act
as if that script just finished loading. (This will cause the script
to be executed, along with any subsequent scripts in that list that
are already loaded, as described in the <code>script</code> element
section.)</p>
<p>Then, -->the rules for <span>when a script completes
loading</span> start applying (script execution is no longer managed
by the parser).</p>

<p>If any of the scripts in the <span>list of scripts that will
execute as soon as possible</span> have <span>completed
loading</span><!-- XXX xref -->, or if the <span>list of scripts
that will execute asynchronously</span> is not empty and the first
script in that list has <span>completed loading</span><!-- XXX xref
-->, then act as if those scripts just completed loading, following
the rules given for that in the <code>script</code> element
definition.</p>

<p>Then, if the <span>list of scripts that will execute when the
document has finished parsing</span> is not empty, and the first
item in this list has already <span>completed loading</span><!--XXX
xref -->, then act as if that script just finished loading.</p>

<p>By this point, there will be no scripts that have loaded but have
not yet been executed.</p>

<p>Once everything that <dfn title="delay the load event">delays the
load event</dfn> has completed, the user agent must <span
Expand Down

0 comments on commit 361dc8e

Please sign in to comment.