[html5] r1085 - /

whatwg at whatwg.org whatwg at whatwg.org
Mon Oct 22 18:18:23 PDT 2007


Author: ianh
Date: 2007-10-22 18:18:22 -0700 (Mon, 22 Oct 2007)
New Revision: 1085

Modified:
   index
   source
Log:
[c] (1) Make <script async defer> use 'defer', and allow that so that you can use 'async' and fallback to 'defer'

Modified: index
===================================================================
--- index	2007-10-19 22:21:55 UTC (rev 1084)
+++ index	2007-10-23 01:18:22 UTC (rev 1085)
@@ -22,7 +22,7 @@
 
    <h1 id=html-5>HTML 5</h1>
 
-   <h2 class="no-num no-toc" id=working>Working Draft — 19 October 2007</h2>
+   <h2 class="no-num no-toc" id=working>Working Draft — 23 October 2007</h2>
 
    <p>You can take part in this work. <a
     href="http://www.whatwg.org/mailing-list">Join the working group's
@@ -19611,10 +19611,10 @@
 
    <dd><code title=attr-script-src><a href="#src9">src</a></code>
 
+   <dd><code title=attr-script-async><a href="#async">async</a></code>
+
    <dd><code title=attr-script-defer><a href="#defer">defer</a></code>
 
-   <dd><code title=attr-script-async><a href="#async">async</a></code>
-
    <dd><code title=attr-script-type><a href="#type11">type</a></code>
 
    <dt>DOM interface:
@@ -19623,8 +19623,8 @@
     <pre
      class=idl>interface <dfn id=htmlscriptelement>HTMLScriptElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
            attribute DOMString <code title=dom-script-src><a href="#src10">src</a></code>;
+           attribute boolean <code title=dom-script-async><a href="#async0">async</a></code>;
            attribute boolean <code title=dom-script-defer><a href="#defer0">defer</a></code>;
-           attribute boolean <code title=dom-script-async><a href="#async0">async</a></code>;
            attribute DOMString <code title=dom-script-type><a href="#type12">type</a></code>;
            attribute DOMString <code title=dom-script-text><a href="#text0">text</a></code>;
 };</pre>
@@ -19647,31 +19647,36 @@
    is present, its value must be a valid MIME type, optionally with
    parameters. <a href="#refsRFC2046">[RFC2046]</a>
 
-  <p>The <dfn id=defer title=attr-script-defer><code>defer</code></dfn> and
-   <dfn id=async title=attr-script-async><code>async</code></dfn> attributes
+  <p>The <dfn id=async title=attr-script-async><code>async</code></dfn> and
+   <dfn id=defer title=attr-script-defer><code>defer</code></dfn> attributes
    are <a href="#boolean0" title="boolean attribute">boolean attributes</a>
    that indicate how the script should be executed.
 
   <p>There are three possible modes that can be selected using these
-   attributes. If the <code title=attr-script-defer><a
+   attributes. If the <code title=attr-script-async><a
+   href="#async">asycn</a></code> attribute is present, then the script will
+   be executed asynchronously, as soon as it is available. If the <code
+   title=attr-script-async><a href="#async">async</a></code> attribute is not
+   present but the <code title=attr-script-defer><a
    href="#defer">defer</a></code> attribute is present, then the script is
-   executed when the page has finished parsing. If the <code
-   title=attr-script-defer><a href="#defer">defer</a></code> attribute is not
-   present but the <code title=attr-script-async><a
-   href="#async">async</a></code> attribute is present, then the script will
-   be executed asynchronously, as soon as it is available. If neither
-   attribute is present, then the script is downloaded and executed
-   immediately, before the user agent continues parsing the page. The exact
-   processing details for these attributes is described below.
+   executed when the page has finished parsing. If neither attribute is
+   present, then the script is downloaded and executed immediately, before
+   the user agent continues parsing the page. The exact processing details
+   for these attributes is described below.
 
-  <p>The <code title=attr-script-async><a href="#async">async</a></code>
-   attribute must not be specified if the <code title=attr-script-defer><a
-   href="#defer">defer</a></code> attribute is specified.
+  <p>The <code title=attr-script-defer><a href="#defer">defer</a></code>
+   attribute may be specified even if the <code title=attr-script-async><a
+   href="#async">async</a></code> attribute is specified, to cause legacy Web
+   browsers that only support <code title=attr-script-defer><a
+   href="#defer">defer</a></code> (and not <code title=attr-script-async><a
+   href="#async">async</a></code>) to fall back to the <code
+   title=attr-script-defer><a href="#defer">defer</a></code> behavior instead
+   of the synchronous blocking behavior that is the default.
 
   <p>Changing the <code title=attr-script-src><a href="#src9">src</a></code>,
    <code title=attr-script-type><a href="#type11">type</a></code>, <code
-   title=attr-script-defer><a href="#defer">defer</a></code> and <code
-   title=attr-script-async><a href="#async">async</a></code> attributes
+   title=attr-script-async><a href="#async">async</a></code>, and <code
+   title=attr-script-defer><a href="#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 inserted into
    the document).
@@ -19768,7 +19773,9 @@
 
     <dl class=switch>
      <dt>If the document is still being parsed, and the element has a <code
-      title=attr-script-defer><a href="#defer">defer</a></code> attribute
+      title=attr-script-defer><a href="#defer">defer</a></code> attribute,
+      and the element does not have an <code title=attr-script-async><a
+      href="#async">async</a></code> attribute
 
      <dd>The element must be added to the end of the <a href="#list-of">list
       of scripts that will execute when the document has finished
@@ -19952,9 +19959,9 @@
 
   <p>The DOM attributes <dfn id=src10
    title=dom-script-src><code>src</code></dfn>, <dfn id=type12
-   title=dom-script-type><code>type</code></dfn>, <dfn id=defer0
-   title=dom-script-defer><code>defer</code></dfn>, <dfn id=async0
-   title=dom-script-async><code>async</code></dfn>, each must <a
+   title=dom-script-type><code>type</code></dfn>, <dfn id=async0
+   title=dom-script-async><code>async</code></dfn>, and <dfn id=defer0
+   title=dom-script-defer><code>defer</code></dfn>, each must <a
    href="#reflect">reflect</a> the respective content attributes of the same
    name.
 

Modified: source
===================================================================
--- source	2007-10-19 22:21:55 UTC (rev 1084)
+++ source	2007-10-23 01:18:22 UTC (rev 1085)
@@ -17286,15 +17286,15 @@
    attribute, the element must be empty.</dd>
    <dt>Element-specific attributes:</dt>
    <dd><code title="attr-script-src">src</code></dd>
+   <dd><code title="attr-script-async">async</code></dd>
    <dd><code title="attr-script-defer">defer</code></dd>
-   <dd><code title="attr-script-async">async</code></dd>
    <dd><code title="attr-script-type">type</code></dd>
    <dt>DOM interface:</dt>
    <dd>
 <pre class="idl">interface <dfn>HTMLScriptElement</dfn> : <span>HTMLElement</span> {
            attribute DOMString <code title="dom-script-src">src</code>;
+           attribute boolean <code title="dom-script-async">async</code>;
            attribute boolean <code title="dom-script-defer">defer</code>;
-           attribute boolean <code title="dom-script-async">async</code>;
            attribute DOMString <code title="dom-script-type">type</code>;
            attribute DOMString <code title="dom-script-text">text</code>;
 };</pre>
@@ -17317,31 +17317,35 @@
   attribute is present, its value must be a valid MIME type,
   optionally with parameters. <a href="#refsRFC2046">[RFC2046]</a></p>
 
-  <p>The <dfn title="attr-script-defer"><code>defer</code></dfn> and
-  <dfn title="attr-script-async"><code>async</code></dfn> attributes
+  <p>The <dfn title="attr-script-async"><code>async</code></dfn> and
+  <dfn title="attr-script-defer"><code>defer</code></dfn> attributes
   are <span title="boolean attribute">boolean attributes</span> that
   indicate how the script should be executed.</p>
 
   <p>There are three possible modes that can be selected using these
-  attributes. If the <code title="attr-script-defer">defer</code>
-  attribute is present, then the script is executed when the page has
-  finished parsing. If the <code
-  title="attr-script-defer">defer</code> attribute is not present but
-  the <code title="attr-script-async">async</code> attribute is
-  present, then the script will be executed asynchronously, as soon as
-  it is available. If neither attribute is present, then the script is
+  attributes. If the <code title="attr-script-async">asycn</code>
+  attribute is present, then the script will be executed
+  asynchronously, as soon as it is available. If the <code
+  title="attr-script-async">async</code> attribute is not present but
+  the <code title="attr-script-defer">defer</code> attribute is
+  present, then the script is executed when the page has finished
+  parsing. If neither attribute is present, then the script is
   downloaded and executed immediately, before the user agent continues
   parsing the page. The exact processing details for these attributes
   is described below.</p>
 
-  <p>The <code title="attr-script-async">async</code> attribute must
-  not be specified if the <code title="attr-script-defer">defer</code>
-  attribute is specified.</p>
+  <p>The <code title="attr-script-defer">defer</code> attribute may be
+  specified even if the <code title="attr-script-async">async</code>
+  attribute is specified, to cause legacy Web browsers that only
+  support <code title="attr-script-defer">defer</code> (and not <code
+  title="attr-script-async">async</code>) to fall back to the <code
+  title="attr-script-defer">defer</code> behavior instead of the
+  synchronous blocking behavior that is the default.</p>
 
   <p>Changing the <code title="attr-script-src">src</code>, <code
   title="attr-script-type">type</code>, <code
-  title="attr-script-defer">defer</code> and <code
-  title="attr-script-async">async</code> attributes dynamically has no
+  title="attr-script-async">async</code>, and <code
+  title="attr-script-defer">defer</code> attributes dynamically has no
   direct effect; these attribute are only used at specific times
   described below (namely, when the element is inserted into the
   document).</p>
@@ -17446,8 +17450,10 @@
 
     <dl class="switch">
 
-     <dt>If the document is still being parsed, and the element
-     has a <code title="attr-script-defer">defer</code> attribute</dt>
+     <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
+     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
@@ -17699,8 +17705,8 @@
   <p>The DOM attributes <dfn
   title="dom-script-src"><code>src</code></dfn>, <dfn
   title="dom-script-type"><code>type</code></dfn>, <dfn
-  title="dom-script-defer"><code>defer</code></dfn>, <dfn
-  title="dom-script-async"><code>async</code></dfn>, each must
+  title="dom-script-async"><code>async</code></dfn>, and <dfn
+  title="dom-script-defer"><code>defer</code></dfn>, each must
   <span>reflect</span> the respective content attributes of the same
   name.</p>
 




More information about the Commit-Watchers mailing list