Skip to content
Permalink
Browse files

[e] (0) Make the 'already started' flag actually work. Also, reorder …

…things in the 'run' algorithm so that we check things in order of cost to check, instead of doing the work up front and then the checks afterwards.

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

git-svn-id: http://svn.whatwg.org/webapps@5449 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed Sep 8, 2010
1 parent 03cc87a commit 2256b1821a4383145efaaf8d863ec59e29bc4e85
Showing with 92 additions and 71 deletions.
  1. +31 −24 complete.html
  2. +31 −24 index
  3. +30 −23 source
encoding</var></dfn>. They are determined when the script is run,
based on the attributes on the element at that time.</p>

<p>When a <code><a href=#script>script</a></code> element that is neither marked as
having <a href=#already-started>"already started"</a> nor marked as being
<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>
element:</p>
<code><a href=#script>script</a></code> element is to be run, the user agent must act as
follows:</p>

<ol><li id=script-processing-prepare>
<ol><li id=script-processing-noscript>

<p>If <a href=#concept-n-noscript title=concept-n-noscript>scripting is
disabled</a> for the <code><a href=#script>script</a></code> element, or if the
<code><a href=#script>script</a></code> element is marked as having <a href=#already-started>"already
started"</a>, then the user agent must abort these steps at
this point. The script is not executed.</p>

</li>

<li id=script-processing-empty>

<p>If the element has no <code title=attr-script-src><a href=#attr-script-src>src</a></code>
attribute, and its child nodes consist only of comment nodes and
empty <a href=#text-node title="text node">text nodes</a>, then the user
agent must abort these steps at this point. The script is not
executed.</p>

</li>

<li id=script-processing-prepare>

<p>If either:</p>


</li>

<li>

<p>If the user agent does not <a href=#support-the-scripting-language>support the scripting
language</a> given by <var><a href="#the-script-block's-type">the script block's type</a></var> for
this <code><a href=#script>script</a></code> element, then the user agent must abort
these steps at this point. The script is not executed.</p>

</li>

<li id=script-processing-encoding>

<p>If the <code><a href=#script>script</a></code> element has a <code title=attr-script-charset><a href=#attr-script-charset>charset</a></code> attribute, then let

</ol></li>

<li id=script-processing-noscript>

<p>If <a href=#concept-n-noscript title=concept-n-noscript>scripting is
disabled</a> for the <code><a href=#script>script</a></code> element, or if the
user agent does not <a href=#support-the-scripting-language>support the scripting language</a>
given by <var><a href="#the-script-block's-type">the script block's type</a></var> for this
<code><a href=#script>script</a></code> element, then the user agent must abort these
steps at this point. The script is not executed.</p>

</li>

<li id=script-processing-empty>

<p>If the element has no <code title=attr-script-src><a href=#attr-script-src>src</a></code>
attribute, and its child nodes consist only of comment nodes and
empty <a href=#text-node title="text node">text nodes</a>, then the user
agent must abort these steps at this point. The script is not
executed.</p>

</li>

<li id=script-processing-start>

<p>The user agent must set the element's <a href=#already-started>"already
55 index
encoding</var></dfn>. They are determined when the script is run,
based on the attributes on the element at that time.</p>

<p>When a <code><a href=#script>script</a></code> element that is neither marked as
having <a href=#already-started>"already started"</a> nor marked as being
<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>
element:</p>
<code><a href=#script>script</a></code> element is to be run, the user agent must act as
follows:</p>

<ol><li id=script-processing-prepare>
<ol><li id=script-processing-noscript>

<p>If <a href=#concept-n-noscript title=concept-n-noscript>scripting is
disabled</a> for the <code><a href=#script>script</a></code> element, or if the
<code><a href=#script>script</a></code> element is marked as having <a href=#already-started>"already
started"</a>, then the user agent must abort these steps at
this point. The script is not executed.</p>

</li>

<li id=script-processing-empty>

<p>If the element has no <code title=attr-script-src><a href=#attr-script-src>src</a></code>
attribute, and its child nodes consist only of comment nodes and
empty <a href=#text-node title="text node">text nodes</a>, then the user
agent must abort these steps at this point. The script is not
executed.</p>

</li>

<li id=script-processing-prepare>

<p>If either:</p>


</li>

<li>

<p>If the user agent does not <a href=#support-the-scripting-language>support the scripting
language</a> given by <var><a href="#the-script-block's-type">the script block's type</a></var> for
this <code><a href=#script>script</a></code> element, then the user agent must abort
these steps at this point. The script is not executed.</p>

</li>

<li id=script-processing-encoding>

<p>If the <code><a href=#script>script</a></code> element has a <code title=attr-script-charset><a href=#attr-script-charset>charset</a></code> attribute, then let

</ol></li>

<li id=script-processing-noscript>

<p>If <a href=#concept-n-noscript title=concept-n-noscript>scripting is
disabled</a> for the <code><a href=#script>script</a></code> element, or if the
user agent does not <a href=#support-the-scripting-language>support the scripting language</a>
given by <var><a href="#the-script-block's-type">the script block's type</a></var> for this
<code><a href=#script>script</a></code> element, then the user agent must abort these
steps at this point. The script is not executed.</p>

</li>

<li id=script-processing-empty>

<p>If the element has no <code title=attr-script-src><a href=#attr-script-src>src</a></code>
attribute, and its child nodes consist only of comment nodes and
empty <a href=#text-node title="text node">text nodes</a>, then the user
agent must abort these steps at this point. The script is not
executed.</p>

</li>

<li id=script-processing-start>

<p>The user agent must set the element's <a href=#already-started>"already
53 source
encoding</var></dfn>. They are determined when the script is run,
based on the attributes on the element at that time.</p>

<p>When a <code>script</code> element that is neither marked as
having <span>"already started"</span> nor marked as being
<p>When a <code>script</code> element that is not marked as being
<span>"parser-inserted"</span> experiences one of the events listed
in the following list, the user agent must synchronously <span
title="running a script">run</span> the <code>script</code>

<ol>

<li id="script-processing-noscript">

<p>If <span title="concept-n-noscript">scripting is
disabled</span> for the <code>script</code> element, or if the
<code>script</code> element is marked as having <span>"already
started"</span>, then the user agent must abort these steps at
this point. The script is not executed.</p>

</li>

<li id="script-processing-empty">

<p>If the element has no <code title="attr-script-src">src</code>
attribute, and its child nodes consist only of comment nodes and
empty <span title="text node">text nodes</span>, then the user
agent must abort these steps at this point. The script is not
executed.</p>

</li>

<li id="script-processing-prepare">

<p>If either:</p>

</li>

<li>

<p>If the user agent does not <span>support the scripting
language</span> given by <var>the script block's type</var> for
this <code>script</code> element, then the user agent must abort
these steps at this point. The script is not executed.</p>

</li>

<li id="script-processing-encoding">

<p>If the <code>script</code> element has a <code

</li>

<li id="script-processing-noscript">

<p>If <span title="concept-n-noscript">scripting is
disabled</span> for the <code>script</code> element, or if the
user agent does not <span>support the scripting language</span>
given by <var>the script block's type</var> for this
<code>script</code> element, then the user agent must abort these
steps at this point. The script is not executed.</p>

</li>

<li id="script-processing-empty">

<p>If the element has no <code title="attr-script-src">src</code>
attribute, and its child nodes consist only of comment nodes and
empty <span title="text node">text nodes</span>, then the user
agent must abort these steps at this point. The script is not
executed.</p>

</li>

<li id="script-processing-start">

<p>The user agent must set the element's <span>"already

0 comments on commit 2256b18

Please sign in to comment.
You can’t perform that action at this time.