W3C home > Mailing lists > Public > public-html-commits@w3.org > April 2009

html5/spec Overview.html,1.2197,1.2198

From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
Date: Thu, 30 Apr 2009 07:02:49 +0000
To: public-html-commits@w3.org
Message-Id: <E1LzQID-0002E6-SA@lionel-hutz.w3.org>
Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv8543

Modified Files:
	Overview.html 
Log Message:
Define the ordering of 'load' events in more pedantic detail. (whatwg r3038)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.2197
retrieving revision 1.2198
diff -u -d -r1.2197 -r1.2198
--- Overview.html	30 Apr 2009 06:33:08 -0000	1.2197
+++ Overview.html	30 Apr 2009 07:02:46 -0000	1.2198
@@ -4496,14 +4496,14 @@
 
     </ol></li>
 
-   <li><p>When the resource is available, <a href="#queue-a-task">queue a task</a>
-   that uses the resource as appropriate. If the resource can be
-   processed incrementally, as, for instance, with a progressively
-   interlaced JPEG or an HTML file, multiple tasks may be queued to
-   process the data as it is downloaded. The <a href="#task-source">task source</a>
-   for these tasks is the <a href="#networking-task-source">networking task source</a>.</p>
-   <!-- XXX make sure each use of 'fetch' defines what the appropriate
-   task is -->
+   <li><p>When the resource is available, or if there is an error of
+   some description, <a href="#queue-a-task">queue a task</a> that uses the resource
+   as appropriate. If the resource can be processed incrementally, as,
+   for instance, with a progressively interlaced JPEG or an HTML file,
+   additional tasks may be queued to process the data as it is
+   downloaded. The <a href="#task-source">task source</a> for these tasks is the
+   <a href="#networking-task-source">networking task source</a>.</p> <!-- XXX make sure each
+   use of 'fetch' defines what the appropriate task is -->
 
   </ol><p class="note">The <a href="#application-cache">application cache</a> processing model
   introduces some <a href="#changesToNetworkingModel">changes to the
@@ -8947,20 +8947,30 @@
   followed and 404 responses must cause the external resource to not
   be applied.)</p>
 
+  <!-- similar text in various places -->
+  <p>Fetching external resources must <a href="#delay-the-load-event">delay the load
+  event</a> of the element's document until the <a href="#concept-task" title="concept-task">task</a> that is <a href="#queue-a-task" title="queue a
+  task">queued</a> by the <a href="#networking-task-source">networking task source</a> once
+  the resource has been <a href="#fetch" title="fetch">fetched</a> (defined
+  below) has been run.</p>
+
   <!-- the next paragraph is similar to text in the <style> section -->
-  <p>Once a resource <em>and any subresources it uses</em> have been
-  <a href="#fetch" title="fetch">fetched</a>, if the loads were successful,
-  the user agent must <a href="#queue-a-task">queue a task</a> to <a href="#fire-a-simple-event">fire a simple
-  event</a> called <code title="event-load"><a href="#event-load">load</a></code> at the
-  <code><a href="#the-link-element">link</a></code> element. If the resource or one of its
-  subresources fails to completely load for any reason (e.g. DNS
-  error, HTTP 404 response, the connection being prematurely closed,
-  unsupported Content-Type), the user agent must instead <a href="#queue-a-task">queue a
-  task</a> to <a href="#fire-a-simple-event">fire a simple event</a> called <code title="event-error"><a href="#event-error">error</a></code> at the <code><a href="#the-link-element">link</a></code>
+  <p>The <a href="#concept-task" title="concept-task">task</a> that is <a href="#queue-a-task" title="queue a task">queued</a> by the <a href="#networking-task-source">networking task
+  source</a> once the resource has been <a href="#fetch" title="fetch">fetched</a> must, if the loads were successful,
+  <a href="#queue-a-task">queue a task</a> to <a href="#fire-a-simple-event">fire a simple event</a> called
+  <code title="event-load"><a href="#event-load">load</a></code> at the <code><a href="#the-link-element">link</a></code>
+  element; otherwise, if the resource or one of its subresources
+  failed to completely load for any reason (e.g. DNS error, HTTP 404
+  response, a connection being prematurely closed, unsupported
+  Content-Type), it must instead <a href="#queue-a-task">queue a task</a> to
+  <a href="#fire-a-simple-event">fire a simple event</a> called <code title="event-error"><a href="#event-error">error</a></code> at the <code><a href="#the-link-element">link</a></code>
   element. Non-network errors in processing the resource or its
   subresources (e.g. CSS parse errors, PNG decoding errors) are not
   failures for the purposes of this paragraph.</p>
 
+  <p>The <a href="#task-source">task source</a> for these tasks is the <a href="#dom-manipulation-task-source">DOM
+  manipulation task source</a>.</p>
+
   <hr><p>Interactive user agents should provide users with a means to
   <a href="#following-hyperlinks" title="following hyperlinks">follow the hyperlinks</a>
   created using the <code><a href="#the-link-element">link</a></code> element, somewhere within their
@@ -9796,7 +9806,12 @@
   event</a> called <code title="event-error"><a href="#event-error">error</a></code> at the
   <code><a href="#the-style-element">style</a></code> element. Non-network errors in the processing of
   the element's contents or its subresources (e.g. CSS parse errors)
-  are not failures for the purposes of this paragraph.</p>
+  are not failures for the purposes of this paragraph. The
+  <code><a href="#the-style-element">style</a></code> element must <a href="#delay-the-load-event">delay the load event</a> of
+  the element's document until one of these <a href="#concept-task" title="concept-task">tasks</a> has been queued.</p>
+
+  <p>The <a href="#task-source">task source</a> for these tasks is the <a href="#dom-manipulation-task-source">DOM
+  manipulation task source</a>.</p>
 
   </div><p class="note">This specification does not specify a style system,
   but CSS is expected to be supported by most Web browsers. <a href="#references">[CSS21]</a><div class="impl">
@@ -10170,7 +10185,13 @@
 
     </dl></li>
 
-  </ol><p><dfn id="when-a-script-completes-loading">When a script completes loading</dfn>: If the
+  </ol><!-- similar text in various places --><p>Fetching an external script must <a href="#delay-the-load-event">delay the load
+  event</a> of the element's document until the <a href="#concept-task" title="concept-task">task</a> that is <a href="#queue-a-task" title="queue a
+  task">queued</a> by the <a href="#networking-task-source">networking task source</a> once
+  the resource has been <a href="#fetch" title="fetch">fetched</a> (defined
+  below) has been run.</p>
+
+  <p><dfn id="when-a-script-completes-loading">When a script completes loading</dfn>: If the
   <code><a href="#script">script</a></code> element was added to one of the lists mentioned
   above and the document is still being parsed, then the parser
   handles it. Otherwise, the UA must run the following steps as the
@@ -10273,10 +10294,7 @@
 
     </ol></dd>
 
-  </dl><p>Fetching an external script must <a href="#delay-the-load-event">delay the load
-  event</a> of the element's document.</p>
-
-  <p><dfn id="executing-a-script-block" title="executing a script block">Executing a script
+  </dl><p><dfn id="executing-a-script-block" title="executing a script block">Executing a script
   block</dfn>: When the steps above require that the script block be
   executed, the user agent must act as follows:</p>
 
@@ -14674,8 +14692,11 @@
   the <i>base URI of the element</i> is the same as <a href="#the-document-s-address">the
   document's address</a>.</p>
 
+  <!-- same text in <input type=image> section and similar text elsewhere -->
   <p>Fetching the image must <a href="#delay-the-load-event">delay the load event</a> of the
-  element's document.</p>
+  element's document until the <a href="#concept-task" title="concept-task">task</a>
+  that is <a href="#queue-a-task" title="queue a task">queued</a> by the
+  <a href="#networking-task-source">networking task source</a> once the resource has been <a href="#fetch" title="fetch">fetched</a> (defined below) has been run.</p>
 
   <p class="warning">This, unfortunately, can be used to perform a
   rudimentary port scan of the user's local network (especially in
@@ -14746,6 +14767,9 @@
   to <a href="#fire-a-simple-event">fire a simple event</a> called <code title="event-error"><a href="#event-error">error</a></code> on the <code><a href="#the-img-element">img</a></code>
   element.</p>
 
+  <p>The <a href="#task-source">task source</a> for these tasks is the <a href="#dom-manipulation-task-source">DOM
+  manipulation task source</a>.</p>
+
   <hr><p>What an <code><a href="#the-img-element">img</a></code> element represents depends on the <code title="attr-img-src"><a href="#attr-img-src">src</a></code> attribute and the <code title="attr-img-alt"><a href="#attr-img-alt">alt</a></code> attribute.</p>
 
   <dl class="switch"><dt>If the <code title="attr-img-src"><a href="#attr-img-src">src</a></code> attribute is set
@@ -16244,14 +16268,26 @@
   content</a>, the user agent must <a href="#resolve-a-url" title="resolve a
   url">resolve</a> the value of the attribute, relative to the
   element, and if that is successful, should <a href="#fetch">fetch</a> the
-  resulting <a href="#absolute-url">absolute URL</a>, find and instantiate an
-  appropriate <a href="#plugin">plugin</a> based on the <a href="#concept-embed-type" title="concept-embed-type">content's type</a>, and hand that
-  <a href="#plugin">plugin</a> the content of the resource, replacing any
+  resulting <a href="#absolute-url">absolute URL</a>. The <a href="#concept-task" title="concept-task">task</a> that is <a href="#queue-a-task" title="queue a
+  task">queued</a> by the <a href="#networking-task-source">networking task source</a> once
+  the resource has been <a href="#fetch" title="fetch">fetched</a> must find
+  and instantiate an appropriate <a href="#plugin">plugin</a> based on the
+  <a href="#concept-embed-type" title="concept-embed-type">content's type</a>, and hand
+  that <a href="#plugin">plugin</a> the content of the resource, replacing any
   previously instantiated plugin for the element. <!-- Note that this
   doesn't happen when the base URL changes. --></p>
 
   <p>Fetching the resource must <a href="#delay-the-load-event">delay the load event</a> of
   the element's document.</p>
+  <!-- if we add load/error events, then replace the previous
+  paragraph with the text one: -->
+  <!-- similar text in various places -->
+  <!--<p>Fetching the resource must <span>delay the load event</span>
+  of the element's document until the final <span
+  title="concept-task">task</span> that is <span title="queue a
+  task">queued</span> by the <span>networking task source</span> once
+  the resource has been <span title="fetch">fetched</span> has been
+  run.</p>-->
 
   <p>The <dfn id="concept-embed-type" title="concept-embed-type">type of the content</dfn>
   being embedded is defined as follows:</p>
@@ -16454,19 +16490,25 @@
       <p>If that is successful, <a href="#fetch">fetch</a> the resulting
       <a href="#absolute-url">absolute URL</a>.</p>
 
-      <p>The fetching of the resource must <a href="#delay-the-load-event">delay the load
-      event</a> of the element's document.</p>
+      <!-- similar text in various places -->
+      <p>Fetching the resource must <a href="#delay-the-load-event">delay the load event</a>
+      of the element's document until the <a href="#concept-task" title="concept-task">task</a> that is <a href="#queue-a-task" title="queue a
+      task">queued</a> by the <a href="#networking-task-source">networking task source</a>
+      once the resource has been <a href="#fetch" title="fetch">fetched</a>
+      (defined next) has been run.</p>
 
      </li>
 
      <li><p>If the resource is not yet available (e.g. because the
      resource was not available in the cache, so that loading the
      resource required making a request over the network), then jump
-     to the last step in the overall set of steps (fallback). When the
-     resource becomes available, or if the load fails, restart this
-     algorithm from this step. Resources can load incrementally; user
-     agents may opt to consider a resource "available" whenever enough
-     data has been obtained to begin processing the resource.</li>
+     to the last step in the overall set of steps (fallback). The
+     <a href="#concept-task" title="concept-task">task</a> that is <a href="#queue-a-task" title="queue
+     a task">queued</a> by the <a href="#networking-task-source">networking task source</a>
+     once the resource is available must restart this algorithm from
+     this step. Resources can load incrementally; user agents may opt
+     to consider a resource "available" whenever enough data has been
+     obtained to begin processing the resource.</li>
 
      <li><p>If the load failed (e.g. the <a href="#url">URL</a> could not be
      <a href="#resolve-a-url" title="resolve a url">resolved</a>, there was an HTTP
@@ -28222,8 +28264,10 @@
    <code title="attr-input-src"><a href="#attr-input-src">src</a></code> attribute is set or
    changed.</li> <!-- XXX define changed -->
 
-  </ul><p>Fetching the image must <a href="#delay-the-load-event">delay the load event</a> of the
-  element's document.</p>
+  </ul><!-- same text in <img> section and similar text elsewhere --><p>Fetching the image must <a href="#delay-the-load-event">delay the load event</a> of the
+  element's document until the <a href="#concept-task" title="concept-task">task</a>
+  that is <a href="#queue-a-task" title="queue a task">queued</a> by the
+  <a href="#networking-task-source">networking task source</a> once the resource has been <a href="#fetch" title="fetch">fetched</a> (defined below) has been run.</p>
 
   <p>If the image was successfully obtained, with no network errors,
   and the image's type is a supported image type, and the image is a
Received on Thursday, 30 April 2009 07:03:00 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 30 April 2009 07:03:04 GMT