[html5] r1604 - /

whatwg at whatwg.org whatwg at whatwg.org
Tue May 13 18:17:19 PDT 2008


Author: ianh
Date: 2008-05-13 18:17:18 -0700 (Tue, 13 May 2008)
New Revision: 1604

Modified:
   index
   source
Log:
[e] (0) Restructure the script execution algorithm to be more clear. Fix a cross-reference problem in the appcache section.

Modified: index
===================================================================
--- index	2008-05-13 22:02:21 UTC (rev 1603)
+++ index	2008-05-14 01:17:18 UTC (rev 1604)
@@ -25,7 +25,7 @@
 
    <h1 id=html-5>HTML 5</h1>
 
-   <h2 class="no-num no-toc" id=draft>Draft Recommendation — 13 May
+   <h2 class="no-num no-toc" id=draft>Draft Recommendation — 14 May
     2008</h2>
 
    <p>You can take part in this work. <a
@@ -22883,48 +22883,66 @@
    <code title=event-load>load</code> event</a>.
 
   <p><dfn id=executing0 title="executing a script block">Executing a script
-   block</dfn>: If the load resulted in an error (for example a DNS error, or
-   an HTTP 404 error), then executing the script must just consist of <a
-   href="#firing5" title="fire an error event">firing an <code
-   title=event-error>error</code> event</a> at the element.
+   block</dfn>:
 
-  <p>If the load was successful, then first the user agent must <a
-   href="#firing4">fire a <code title=event-load>load</code> event</a> at the
-   element, and then, if <a href="#scripting2">scripting is enabled</a>, and
-   the <code>Document</code> does not have <code
-   title=dom-document-designMode><a href="#designMode">designMode</a></code>
-   enabled, and the <code>Document</code> is the <a href="#active">active
-   document</a> in its <a href="#browsing1">browsing context</a>, the user
-   agent must execute the script:
+  <dl class=switch>
+   <dt>If the load resulted in an error (for example a DNS error, or an HTTP
+    404 error)
 
-  <p>If the script is from an external file, then that file must be used as
-   the file to execute.
+   <dd>
+    <p>Executing the script must just consist of <a href="#firing5"
+     title="fire an error event">firing an <code
+     title=event-error>error</code> event</a> at the element.
 
-  <p>If the script is inline, then, for scripting languages that consist of
-   pure text, user agents must use the value of the DOM <code
-   title=dom-script-text><a href="#text1">text</a></code> attribute (defined
-   below) as the script to execute, and for XML-based scripting languages,
-   user agents must use all the child nodes of the <code><a
-   href="#script0">script</a></code> element as the script to execute.
+   <dt>If the load was successful
 
-  <p>In any case, the user agent must execute the script according to the
-   semantics defined by the language associated with <var><a
-   href="#the-scripts">the script's type</a></var> (see the <a
-   href="#scriptingLanguages">scripting languages</a> section below).
+   <dd>
+    <p>First the user agent must <a href="#firing4">fire a <code
+     title=event-load>load</code> event</a> at the element, and then, if <a
+     href="#scripting2">scripting is enabled</a>, and the
+     <code>Document</code> does not have <code
+     title=dom-document-designMode><a
+     href="#designMode">designMode</a></code> enabled, and the
+     <code>Document</code> is the <a href="#active">active document</a> in
+     its <a href="#browsing1">browsing context</a>, the user agent must
+     execute the script:</p>
 
-  <p>Scripts must be executed in the scope of the <a
-   href="#browsing1">browsing context</a> of the element's
-   <code>Document</code>.
+    <dl class=switch>
+     <dt>If the script is from an external file
 
-  <p class=note>The element's attributes' values might have changed between
-   when the element was inserted into the document and when the script has
-   finished loading, as may its other attributes; similarly, the element
-   itself might have been taken back out of the DOM, or had other changes
-   made. These changes do not in any way affect the above steps; only the
-   values of the attributes at the time the <code><a
-   href="#script0">script</a></code> element is first inserted into the
-   document matter.
+     <dd>
+      <p>That file must be used as the file to execute.</p>
 
+     <dt>If the script is inline
+
+     <dd>
+      <p>For scripting languages that consist of pure text, user agents must
+       use the value of the DOM <code title=dom-script-text><a
+       href="#text1">text</a></code> attribute (defined below) as the script
+       to execute, and for XML-based scripting languages, user agents must
+       use all the child nodes of the <code><a
+       href="#script0">script</a></code> element as the script to execute.</p>
+    </dl>
+
+    <p>In any case, the user agent must execute the script according to the
+     semantics defined by the language associated with <var><a
+     href="#the-scripts">the script's type</a></var> (see the <a
+     href="#scriptingLanguages">scripting languages</a> section below).</p>
+
+    <p>Scripts must be executed in the scope of the <a
+     href="#browsing1">browsing context</a> of the element's
+     <code>Document</code>.</p>
+
+    <p class=note>The element's attributes' values might have changed between
+     when the element was inserted into the document and when the script has
+     finished loading, as may its other attributes; similarly, the element
+     itself might have been taken back out of the DOM, or had other changes
+     made. These changes do not in any way affect the above steps; only the
+     values of the attributes at the time the <code><a
+     href="#script0">script</a></code> element is first inserted into the
+     document matter.</p>
+  </dl>
+
   <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=async0
@@ -30076,7 +30094,7 @@
      out, or the user cancels the download, or the parser for manifests fails
      when checking the magic signature), or if the resource is labeled with a
      MIME type other than <code title="">text/cache-manifest</code>, then run
-     just to the <span>caching failure steps</span>.</p>
+     the <a href="#cache0">cache failure steps</a>.</p>
 
    <li>
     <p>If this is an <a href="#upgrade"

Modified: source
===================================================================
--- source	2008-05-13 22:02:21 UTC (rev 1603)
+++ source	2008-05-14 01:17:18 UTC (rev 1604)
@@ -20802,47 +20802,76 @@
   title="event-load">load</code> event</span>.</p>
 
   <p><dfn title="executing a script block">Executing a script
-  block</dfn>: If the load resulted in an error (for example a DNS
-  error, or an HTTP 404 error), then executing the script must just
-  consist of <span title="fire an error event">firing an <code
-  title="event-error">error</code> event</span> at the element.</p>
+  block</dfn>:</p>
 
-  <p>If the load was successful, then first the user agent must
-  <span>fire a <code title="event-load">load</code> event</span> at
-  the element, and then, if <span>scripting is enabled</span>, and the
-  <code>Document</code> does not have <code
-  title="dom-document-designMode">designMode</code> enabled, and the
-  <code>Document</code> is the <span>active document</span> in its
-  <span>browsing context</span>, the user agent must execute the
-  script:</p>
+  <dl class="switch">
 
-  <p>If the script is from an external file, then that file must be
-  used as the file to execute.</p>
+   <dt>If the load resulted in an error (for example a DNS error, or
+   an HTTP 404 error)</dt>
 
-  <p>If the script is inline, then, for scripting languages that
-  consist of pure text, user agents must use the value of the DOM
-  <code title="dom-script-text">text</code> attribute (defined below)
-  as the script to execute, and for XML-based scripting languages,
-  user agents must use all the child nodes of the <code>script</code>
-  element as the script to execute.</p>
+   <dd><p>Executing the script must just consist of <span title="fire
+   an error event">firing an <code title="event-error">error</code>
+   event</span> at the element.</p></dd>
 
-  <p>In any case, the user agent must execute the script according to
-  the semantics defined by the language associated with <var>the
-  script's type</var> (see the <a href="#scriptingLanguages">scripting
-  languages</a> section below).</p>
+   <dt>If the load was successful</dt>
 
-  <p>Scripts must be executed in the scope of the <span>browsing
-  context</span> of the element's <code>Document</code>.</p>
+   <dd>
 
-  <p class="note">The element's attributes' values might have changed
-  between when the element was inserted into the document and when the
-  script has finished loading, as may its other attributes; similarly,
-  the element itself might have been taken back out of the DOM, or had
-  other changes made. These changes do not in any way affect the above
-  steps; only the values of the attributes at the time the
-  <code>script</code> element is first inserted into the document
-  matter.</p>
+    <p>First the user agent must <span>fire a <code
+    title="event-load">load</code> event</span> at the element, and
+    then, if <span>scripting is enabled</span>, and the
+    <code>Document</code> does not have <code
+    title="dom-document-designMode">designMode</code> enabled, and the
+    <code>Document</code> is the <span>active document</span> in its
+    <span>browsing context</span>, the user agent must execute the
+    script:</p>
 
+    <dl class="switch">
+
+     <dt>If the script is from an external file</dt>
+
+     <dd>
+
+      <p>That file must be used as the file to execute.</p>
+
+     </dd>
+
+     <dt>If the script is inline</dt>
+
+     <dd>
+
+      <p>For scripting languages that consist of pure text, user
+      agents must use the value of the DOM <code
+      title="dom-script-text">text</code> attribute (defined below) as
+      the script to execute, and for XML-based scripting languages,
+      user agents must use all the child nodes of the
+      <code>script</code> element as the script to execute.</p>
+
+     </dd>
+
+    </dl>
+
+    <p>In any case, the user agent must execute the script according to
+    the semantics defined by the language associated with <var>the
+    script's type</var> (see the <a href="#scriptingLanguages">scripting
+    languages</a> section below).</p>
+
+    <p>Scripts must be executed in the scope of the <span>browsing
+    context</span> of the element's <code>Document</code>.</p>
+
+    <p class="note">The element's attributes' values might have changed
+    between when the element was inserted into the document and when the
+    script has finished loading, as may its other attributes; similarly,
+    the element itself might have been taken back out of the DOM, or had
+    other changes made. These changes do not in any way affect the above
+    steps; only the values of the attributes at the time the
+    <code>script</code> element is first inserted into the document
+    matter.</p>
+
+   </dd>
+
+  </dl>
+
   <p>The DOM attributes <dfn
   title="dom-script-src"><code>src</code></dfn>, <dfn
   title="dom-script-type"><code>type</code></dfn>, <dfn
@@ -27932,8 +27961,8 @@
     connection times out, or the user cancels the download, or the
     parser for manifests fails when checking the magic signature), or
     if the resource is labeled with a MIME type other than <code
-    title="">text/cache-manifest</code>, then run just to the
-    <span>caching failure steps</span>.</p>
+    title="">text/cache-manifest</code>, then run the <span>cache
+    failure steps</span>.</p>
 
    </li>
 




More information about the Commit-Watchers mailing list