[html5] r3550 - [] (0) Remove support for <script defer> with no src='', and remove the associat [...]

whatwg at whatwg.org whatwg at whatwg.org
Thu Aug 6 17:03:35 PDT 2009


Author: ianh
Date: 2009-08-06 17:03:34 -0700 (Thu, 06 Aug 2009)
New Revision: 3550

Modified:
   index
   source
Log:
[] (0) Remove support for <script defer> with no src='', and remove the associated magic with innerHTML that this involved.

Modified: index
===================================================================
--- index	2009-08-06 23:43:32 UTC (rev 3549)
+++ index	2009-08-07 00:03:34 UTC (rev 3550)
@@ -71,7 +71,7 @@
   <div class=head>
    <p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
    <h1>HTML 5</h1>
-   <h2 class="no-num no-toc" id=draft-standard-—-date:-01-jan-1901>Draft Standard — 6 August 2009</h2>
+   <h2 class="no-num no-toc" id=draft-standard-—-date:-01-jan-1901>Draft Standard — 7 August 2009</h2>
    <p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
    <p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
    <!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
@@ -9464,48 +9464,6 @@
 
   <ol><li>
 
-    <p>If the node is an <code>Element</code> node, and the node's
-    document is an <a href=#html-documents title="HTML documents">HTML document</a>,
-    and the node is <a href=#in-a-document>in a <code>Document</code></a>, and the
-    node's document has an <a href=#active-parser>active parser</a>, and the
-    <a href=#insertion-point>insertion point</a> associated with that parser's
-    <a href=#the-input-stream>input stream</a> is not undefined (that is, it
-    <em>does</em> point to somewhere in the input stream), and 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> is not empty, then run the following
-    substeps:</p>
-
-    <ol><li><p>Let <var title="">the script</var> be the first element 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>
-
-     <li><p><i>Loop</i>: If <var title="">the script</var> is a
-     <code><a href=#script>script</a></code> element without a <code title=attr-script-src><a href=#attr-script-src>src</a></code> attribute, then <a href=#executing-a-script-block title="executing a script block">execute</a> <var title="">the
-     script</var>.</li>
-
-     <li><p>If <var title="">the script</var> is not the last script
-     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>, then let <var title="">the
-     script</var> be the next script in that list, and return to the
-     step marked <i>loop</i>.</p>
-
-     <li><p>Remove any scripts that were executed as part of this
-     algorithm from 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>
-
-    </ol><!--
-     TESTS: http://www.hixie.ch/tests/adhoc/html/parsing/script-defer-write/
-     Note: IE8 actually drops on the floor any scripts which had
-     src="" but aren't yet completely loaded, and executes the rest. I
-     don't want to spec a race condition, though, and other browser
-     vendors don't want to block on network I/O in
-     innerHTML. Unfortunately, this means that external scripts with
-     defer="" will blow away the document if they do document.write(),
-     which is incompatible with IE.
-    --></li>
-
-   <li>
-
     <p>If the node's document is an <a href=#html-documents title="HTML documents">HTML
     document</a>: Invoke the <a href=#html-fragment-parsing-algorithm>HTML fragment parsing
     algorithm</a>.</p>
@@ -11421,6 +11379,10 @@
   support <code title=attr-script-defer><a href=#attr-script-defer>defer</a></code> (and not <code title=attr-script-async><a href=#attr-script-async>async</a></code>) to fall back to the <code title=attr-script-defer><a href=#attr-script-defer>defer</a></code> behavior instead of the
   synchronous blocking behavior that is the default.</p>
 
+  <p>If the <code title=attr-script-defer><a href=#attr-script-defer>defer</a></code> attribute may
+  be specified, the <code title=attr-script-src><a href=#attr-script-src>src</a></code> attribute
+  must also be specified.</p>
+
   <p>Changing the <code title=attr-script-src><a href=#attr-script-src>src</a></code>, <code title=attr-script-type><a href=#attr-script-type>type</a></code>, <code title=attr-script-charset><a href=#attr-script-charset>charset</a></code>, <code title=attr-script-async><a href=#attr-script-async>async</a></code>, and <code title=attr-script-defer><a href=#attr-script-defer>defer</a></code> attributes dynamically has no
   direct effect; these attribute are only used at specific times
   described below (namely, when the element is <a href=#insert-an-element-into-a-document title="insert an
@@ -11579,21 +11541,13 @@
 
     <dl class=switch><dt>If the document is still being parsed, and the element has a
      <code title=attr-script-defer><a href=#attr-script-defer>defer</a></code> attribute, and the
-     element does not have an <code title=attr-script-async><a href=#attr-script-async>async</a></code> attribute</dt>
+     element has a <code title=attr-script-src><a href=#attr-script-src>src</a></code> attribute,
+     and the element does not have an <code title=attr-script-async><a href=#attr-script-async>async</a></code> attribute</dt>
 
      <dd>The element must be added to the end of 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>.
 
-     <!-- What IE does here is slightly different. If we need to tweak
-     this for better compatibility:
-       http://www.websiteoptimization.com/speed/tweak/defer/test/
-       internal deferred scripts execute before any external scripts execute, or before the LOAD if there are none
-       external deferred scripts execute before the LOAD
-     See also the innerHTML attribute, which does weird things for
-     this list of scripts.
-     -->
-
      </dd>
 
 

Modified: source
===================================================================
--- source	2009-08-06 23:43:32 UTC (rev 3549)
+++ source	2009-08-07 00:03:34 UTC (rev 3550)
@@ -9768,56 +9768,6 @@
 
    <li>
 
-    <p>If the node is an <code>Element</code> node, and the node's
-    document is an <span title="HTML documents">HTML document</span>,
-    and the node is <span>in a <code>Document</code></span>, and the
-    node's document has an <span>active parser</span>, and the
-    <span>insertion point</span> associated with that parser's
-    <span>input stream</span> is not undefined (that is, it
-    <em>does</em> point to somewhere in the input stream), and the
-    <span>list of scripts that will execute when the document has
-    finished parsing</span> is not empty, then run the following
-    substeps:</p>
-
-    <ol>
-
-     <li><p>Let <var title="">the script</var> be the first element in
-     the <span>list of scripts that will execute when the document has
-     finished parsing</span>.</p></li>
-
-     <li><p><i>Loop</i>: If <var title="">the script</var> is a
-     <code>script</code> element without a <code
-     title="attr-script-src">src</code> attribute, then <span
-     title="executing a script block">execute</span> <var title="">the
-     script</var>.</p></li>
-
-     <li><p>If <var title="">the script</var> is not the last script
-     in the <span>list of scripts that will execute when the document
-     has finished parsing</span>, then let <var title="">the
-     script</var> be the next script in that list, and return to the
-     step marked <i>loop</i>.</p>
-
-     <li><p>Remove any scripts that were executed as part of this
-     algorithm from the <span>list of scripts that will execute when
-     the document has finished parsing</span>.</p></li>
-
-    </ol>
-
-    <!--
-     TESTS: http://www.hixie.ch/tests/adhoc/html/parsing/script-defer-write/
-     Note: IE8 actually drops on the floor any scripts which had
-     src="" but aren't yet completely loaded, and executes the rest. I
-     don't want to spec a race condition, though, and other browser
-     vendors don't want to block on network I/O in
-     innerHTML. Unfortunately, this means that external scripts with
-     defer="" will blow away the document if they do document.write(),
-     which is incompatible with IE.
-    -->
-
-   </li>
-
-   <li>
-
     <p>If the node's document is an <span title="HTML documents">HTML
     document</span>: Invoke the <span>HTML fragment parsing
     algorithm</span>.</p>
@@ -12023,6 +11973,10 @@
   title="attr-script-defer">defer</code> behavior instead of the
   synchronous blocking behavior that is the default.</p>
 
+  <p>If the <code title="attr-script-defer">defer</code> attribute may
+  be specified, the <code title="attr-script-src">src</code> attribute
+  must also be specified.</p>
+
   <p>Changing the <code title="attr-script-src">src</code>, <code
   title="attr-script-type">type</code>, <code
   title="attr-script-charset">charset</code>, <code
@@ -12218,22 +12172,14 @@
 
      <dt>If the document is still being parsed, and the element has a
      <code title="attr-script-defer">defer</code> attribute, and the
-     element does not have an <code
+     element has a <code title="attr-script-src">src</code> attribute,
+     and the element does not have an <code
      title="attr-script-async">async</code> attribute</dt>
 
      <dd>The element must be added to the end of the <span>list of
      scripts that will execute when the document has finished
      parsing</span>.
 
-     <!-- What IE does here is slightly different. If we need to tweak
-     this for better compatibility:
-       http://www.websiteoptimization.com/speed/tweak/defer/test/
-       internal deferred scripts execute before any external scripts execute, or before the LOAD if there are none
-       external deferred scripts execute before the LOAD
-     See also the innerHTML attribute, which does weird things for
-     this list of scripts.
-     -->
-
      </dd>
 
 




More information about the Commit-Watchers mailing list