Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[e] (0) Rename the algorithms for running and executing a script to h…
…ave less confusing names. They're now 'prepare a script' and 'execute the script block' respectively.

Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=11301

git-svn-id: http://svn.whatwg.org/webapps@5855 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Feb 8, 2011
1 parent 01c4b56 commit 0d05388
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 93 deletions.
59 changes: 28 additions & 31 deletions complete.html
Expand Up @@ -14906,12 +14906,13 @@ <h4 id=script><span class=secno>4.3.1 </span>The <dfn><code>script</code></dfn>
type</var></dfn>, <dfn id="the-script-block's-character-encoding"><var>the script block's character
encoding</var></dfn>, and <dfn id="the-script-block's-fallback-character-encoding"><var>the script block's fallback
character encoding</var></dfn>. They are determined when the script
is run, based on the attributes on the element at that time, and the
<code><a href=#document>Document</a></code> of the <code><a href=#script>script</a></code> element.</p>
is prepared, based on the attributes on the element at that time,
and the <code><a href=#document>Document</a></code> of the <code><a href=#script>script</a></code>
element.</p>

<p>When a <code><a href=#script>script</a></code> element that is not marked as being
<a href=#parser-inserted>"parser-inserted"</a> experiences one of the events listed
in the following list, the user agent must synchronously <a href=#running-a-script title="running a script">run</a> the <code><a href=#script>script</a></code>
in the following list, the user agent must synchronously <a href=#prepare-a-script title="prepare a script">prepare</a> the <code><a href=#script>script</a></code>
element:</p>

<ul><li>The <code><a href=#script>script</a></code> element gets <a href=#insert-an-element-into-a-document title="insert an
Expand All @@ -14924,9 +14925,8 @@ <h4 id=script><span class=secno>4.3.1 </span>The <dfn><code>script</code></dfn>
<code>Document</code></a> and has a <code title=attr-script-src><a href=#attr-script-src>src</a></code> attribute set where previously
the element had no such attribute.</li>

</ul><p><dfn id=running-a-script title="running a script">Running a script</dfn>: When a
<code><a href=#script>script</a></code> element is to be run, the user agent must act as
follows:</p>
</ul><p>To <dfn id=prepare-a-script title="prepare a script">prepare a script</dfn>, the user
agent must act as follows:</p>

<ol><li>

Expand Down Expand Up @@ -15206,7 +15206,7 @@ <h4 id=script><span class=secno>4.3.1 </span>The <dfn><code>script</code></dfn>
<p>The element must be added to the end of the <dfn id=list-of-scripts-that-will-execute-in-order-as-soon-as-possible>list of
scripts that will execute in order as soon as possible</dfn>
associated with the <code><a href=#document>Document</a></code> of the
<code><a href=#script>script</a></code> element at the time the <a href=#running-a-script>running a
<code><a href=#script>script</a></code> element at the time the <a href=#prepare-a-script>prepare a
script</a> algorithm started.</p>

<p>The <a href=#concept-task title=concept-task>task</a> that the
Expand All @@ -15220,10 +15220,10 @@ <h4 id=script><span class=secno>4.3.1 </span>The <dfn><code>script</code></dfn>
element as ready but abort these steps without executing the
script yet.</li>

<li><p><i>Execution</i>: <a href=#executing-a-script-block title="executing a script
block">Execute the script block</a> corresponding to the
first script element in this <a href=#list-of-scripts-that-will-execute-in-order-as-soon-as-possible>list of scripts that will
execute in order as soon as possible</a>.</li>
<li><p><i>Execution</i>: <a href=#execute-the-script-block>Execute the script block</a>
corresponding to the first script element in this <a href=#list-of-scripts-that-will-execute-in-order-as-soon-as-possible>list of
scripts that will execute in order as soon as
possible</a>.</li>

<li><p>Remove the first element from this <a href=#list-of-scripts-that-will-execute-in-order-as-soon-as-possible>list of scripts
that will execute in order as soon as possible</a>.</li>
Expand All @@ -15243,24 +15243,22 @@ <h4 id=script><span class=secno>4.3.1 </span>The <dfn><code>script</code></dfn>
<p>The element must be added to the <dfn id=set-of-scripts-that-will-execute-as-soon-as-possible>set of scripts that
will execute as soon as possible</dfn> of the
<code><a href=#document>Document</a></code> of the <code><a href=#script>script</a></code> element at the
time the <a href=#running-a-script>running a script</a> algorithm started.</p>
time the <a href=#prepare-a-script>prepare a script</a> algorithm started.</p>

<p>The <a href=#concept-task title=concept-task>task</a> that the
<a href=#networking-task-source>networking task source</a> places on the <a href=#task-queue>task
queue</a> once the <a href=#fetch title=fetch>fetching
algorithm</a> has completed must <a href=#executing-a-script-block title="executing a
script block">execute the script block</a> and then remove
the element from the <a href=#set-of-scripts-that-will-execute-as-soon-as-possible>set of scripts that will execute as
soon as possible</a>.</p>
algorithm</a> has completed must <a href=#execute-the-script-block>execute the script
block</a> and then remove the element from the <a href=#set-of-scripts-that-will-execute-as-soon-as-possible>set of
scripts that will execute as soon as possible</a>.</p>

</dd>


<dt id=script-processing-inline>Otherwise</dt>

<dd>The user agent must immediately <a href=#executing-a-script-block title="executing a
script block">execute the script block</a>, even if other
scripts are already executing.</dd>
<dd>The user agent must immediately <a href=#execute-the-script-block>execute the script
block</a>, even if other scripts are already executing.</dd>

</dl></li>

Expand Down Expand Up @@ -15294,9 +15292,8 @@ <h4 id=script><span class=secno>4.3.1 </span>The <dfn><code>script</code></dfn>
blocking scripts" state, things aren't defined in terms of which
style sheets are blocking which scripts -->

<p><dfn id=executing-a-script-block title="executing a script block">Executing a script
block</dfn>: When the steps above require that the script block be
executed, the user agent must act as follows:</p>
<p>When the user agent is required to <dfn id=execute-the-script-block title="execute the script
block">execute a script block</dfn>, it must act as follows:</p>

<dl class=switch><dt>If the load resulted in an error (for example a DNS error, or
an HTTP 404 error)</dt>
Expand All @@ -15312,7 +15309,7 @@ <h4 id=script><span class=secno>4.3.1 </span>The <dfn><code>script</code></dfn>
<p>Executing the script block must consists of running the
following steps. For the purposes of these steps, the script is
considered to be from an <i>external file</i> if, while the
<a href=#running-a-script>running a script</a> algorithm above was running for this
<a href=#prepare-a-script>prepare a script</a> algorithm above was running for this
script, the <code><a href=#script>script</a></code> element had a <code title=attr-script-src><a href=#attr-script-src>src</a></code> attribute specified.</p>

<ol><li>
Expand Down Expand Up @@ -82619,7 +82616,7 @@ <h5 id=the-before-head-insertion-mode><span class=secno>12.2.5.6 </span>The "<df
<p>Increment the parser's <a href=#script-nesting-level>script nesting level</a> by
one.</p>

<p><a href=#running-a-script title="running a script">Run</a> the <var title="">script</var>. This might cause some script to execute,
<p><a href=#prepare-a-script title="prepare a script">Prepare</a> the <var title="">script</var>. This might cause some script to execute,
which might cause <a href=#dom-document-write title=dom-document-write>new characters
to be inserted into the tokenizer</a>, and might cause the
tokenizer to output more tokens, resulting in a <a href=#nestedParsing>reentrant invocation of the parser</a>.</p>
Expand Down Expand Up @@ -82686,7 +82683,7 @@ <h5 id=the-before-head-insertion-mode><span class=secno>12.2.5.6 </span>The "<df
by one (it should be zero before this step, so this sets it to
one).</li>

<li><p><a href=#executing-a-script-block title="executing a script block">Execute</a>
<li><p><a href=#execute-the-script-block title="execute the script block">Execute</a>
<var title="">the script</var>.</li>

<li><p>Decrement the parser's <a href=#script-nesting-level>script nesting level</a>
Expand Down Expand Up @@ -84134,7 +84131,7 @@ <h4 id=the-end><span class=secno>12.2.6 </span>The end</h4>
the parser's <code><a href=#document>Document</a></code> <a href=#has-no-style-sheet-that-is-blocking-scripts>has no style sheet that
is blocking scripts</a>.</li>

<li><p><a href=#executing-a-script-block title="executing a script block">Execute</a> the
<li><p><a href=#execute-the-script-block title="execute the script block">Execute</a> the
first <code><a href=#script>script</a></code> in the <a href=#list-of-scripts-that-will-execute-when-the-document-has-finished-parsing>list of scripts that will
execute when the document has finished parsing</a>.</li>

Expand Down Expand Up @@ -85181,10 +85178,10 @@ <h3 id=parsing-xhtml-documents><span class=secno>13.2 </span>Parsing XHTML docum
flag must be unset. If the parser was originally created for the
<a href=#xml-fragment-parsing-algorithm>XML fragment parsing algorithm</a>, then the element must
be marked as <a href=#already-started>"already started"</a> also. When the element's
end tag is parsed, the user agent must <a href=#running-a-script title="running a
script">run</a> the <code><a href=#script>script</a></code> element. If this causes
there to be a <a href=#pending-parsing-blocking-script>pending parsing-blocking script</a>, then the
user agent must run the following steps:</p>
end tag is parsed, the user agent must <a href=#prepare-a-script title="prepare a
script">prepare</a> the <code><a href=#script>script</a></code> element. If this
causes there to be a <a href=#pending-parsing-blocking-script>pending parsing-blocking script</a>,
then the user agent must run the following steps:</p>

<ol><li><p>Block this instance of the <a href=#xml-parser>XML parser</a>, such
that the <a href=#event-loop>event loop</a> will not run <a href=#concept-task title=concept-task>tasks</a> that invoke it.</li>
Expand All @@ -85199,7 +85196,7 @@ <h3 id=parsing-xhtml-documents><span class=secno>13.2 </span>Parsing XHTML docum
that <a href=#concept-task title=concept-task>tasks</a> that invoke it can
again be run.</li>

<li><p><a href=#executing-a-script-block title="executing a script block">Execute</a> the
<li><p><a href=#execute-the-script-block title="execute the script block">Execute</a> the
<a href=#pending-parsing-blocking-script>pending parsing-blocking script</a>.</li>

<li><p>There is no longer a <a href=#pending-parsing-blocking-script>pending parsing-blocking
Expand Down

0 comments on commit 0d05388

Please sign in to comment.