Navigation Menu

Skip to content

Commit

Permalink
[giow] (2) Allow parser-inserted scripts to rerun if they failed to b…
Browse files Browse the repository at this point in the history
…e run by the parser.

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

git-svn-id: http://svn.whatwg.org/webapps@5496 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Sep 25, 2010
1 parent 1e1573a commit 3b637eb
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 12 deletions.
32 changes: 28 additions & 4 deletions complete.html
Expand Up @@ -14260,13 +14260,30 @@ <h4 id=script><span class=secno>4.3.1 </span>The <dfn><code>script</code></dfn>

</li>

<li>

<p>If the element has its <a href=#parser-inserted>"parser-inserted"</a> flag set,
then set <var title="">was-parser-inserted</var> to true and unset
the element's <a href=#parser-inserted>"parser-inserted"</a> flag. Otherwise, set
<var title="">was-parser-inserted</var> to false.</p>

<p class=note>This is done so that if parser-inserted
<code><a href=#script>script</a></code> elements fail to run when the parser tries to
run them, e.g. because they are empty or specify an unsupported
scripting language, another script can later mutate them and cause
them to run again.</p>

<!-- q.v. http://hsivonen.iki.fi/test/moz/script-setting-src-on-parser-inserted-script.html -->

</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>
attribute, and its child nodes, if any, 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>

Expand Down Expand Up @@ -14352,6 +14369,13 @@ <h4 id=script><span class=secno>4.3.1 </span>The <dfn><code>script</code></dfn>

</li>

<li>

<p>If <var title="">was-parser-inserted</var> is true, then flag
the element as <a href=#parser-inserted>"parser-inserted"</a> again.</p>

</li>

<li>

<p>If the element's <code><a href=#document>Document</a></code> has an <a href=#active-parser>active
Expand Down
32 changes: 28 additions & 4 deletions index
Expand Up @@ -14237,13 +14237,30 @@ c-end = "--&gt;"</pre>

</li>

<li>

<p>If the element has its <a href=#parser-inserted>"parser-inserted"</a> flag set,
then set <var title="">was-parser-inserted</var> to true and unset
the element's <a href=#parser-inserted>"parser-inserted"</a> flag. Otherwise, set
<var title="">was-parser-inserted</var> to false.</p>

<p class=note>This is done so that if parser-inserted
<code><a href=#script>script</a></code> elements fail to run when the parser tries to
run them, e.g. because they are empty or specify an unsupported
scripting language, another script can later mutate them and cause
them to run again.</p>

<!-- q.v. http://hsivonen.iki.fi/test/moz/script-setting-src-on-parser-inserted-script.html -->

</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>
attribute, and its child nodes, if any, 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>

Expand Down Expand Up @@ -14329,6 +14346,13 @@ c-end = "--&gt;"</pre>

</li>

<li>

<p>If <var title="">was-parser-inserted</var> is true, then flag
the element as <a href=#parser-inserted>"parser-inserted"</a> again.</p>

</li>

<li>

<p>If the element's <code><a href=#document>Document</a></code> has an <a href=#active-parser>active
Expand Down
32 changes: 28 additions & 4 deletions source
Expand Up @@ -15084,13 +15084,30 @@ c-end = "-->"</pre>

</li>

<li>

<p>If the element has its <span>"parser-inserted"</span> flag set,
then set <var title="">was-parser-inserted</var> to true and unset
the element's <span>"parser-inserted"</span> flag. Otherwise, set
<var title="">was-parser-inserted</var> to false.</p>

<p class="note">This is done so that if parser-inserted
<code>script</code> elements fail to run when the parser tries to
run them, e.g. because they are empty or specify an unsupported
scripting language, another script can later mutate them and cause
them to run again.</p>

<!-- q.v. http://hsivonen.iki.fi/test/moz/script-setting-src-on-parser-inserted-script.html -->

</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>
attribute, and its child nodes, if any, 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>

Expand Down Expand Up @@ -15206,6 +15223,13 @@ c-end = "-->"</pre>

</li>

<li>

<p>If <var title="">was-parser-inserted</var> is true, then flag
the element as <span>"parser-inserted"</span> again.</p>

</li>

<li>

<p>If the element's <code>Document</code> has an <span>active
Expand Down

0 comments on commit 3b637eb

Please sign in to comment.