hixie: Allow parser-inserted scripts to rerun if they failed to be run by the parser. (whatwg r5496)

hixie: Allow parser-inserted scripts to rerun if they failed to be run
by the parser. (whatwg r5496)

http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.4386&r2=1.4387&f=h
http://html5.org/tools/web-apps-tracker?from=5495&to=5496

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.4386
retrieving revision 1.4387
diff -u -d -r1.4386 -r1.4387
--- Overview.html 25 Sep 2010 18:56:17 -0000 1.4386
+++ Overview.html 25 Sep 2010 19:26:28 -0000 1.4387
@@ -12361,13 +12361,30 @@
 
    </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>
 
@@ -12455,6 +12472,13 @@
 
    <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
     parser</a>, and the parser's <a href="#script-nesting-level">script nesting level</a>
     is non-zero, but this <code><a href="#script">script</a></code> element does not have

Received on Saturday, 25 September 2010 19:27:12 UTC