W3C home > Mailing lists > Public > public-html-commits@w3.org > December 2008

html5/workers Overview.html,1.67,1.68

From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
Date: Tue, 16 Dec 2008 00:52:42 +0000
To: public-html-commits@w3.org
Message-Id: <E1LCOB0-00072z-A4@lionel-hutz.w3.org>

Update of /sources/public/html5/workers
In directory hutz:/tmp/cvs-serv27075

Modified Files:
	Overview.html 
Log Message:
Terminology update to match recent HTML5 changes. (whatwg r75)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/workers/Overview.html,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- Overview.html	26 Nov 2008 23:33:07 -0000	1.67
+++ Overview.html	16 Dec 2008 00:52:40 -0000	1.68
@@ -16,7 +16,7 @@
    <h1>Web Workers</h1>
 
    <h2 class="no-num no-toc" id=editors><!-- "W3C Working Draft" --> Editor's
-    Draft <!--ZZZ-->26 November 2008</h2>
+    Draft <!--ZZZ-->16 December 2008</h2>
 
    <dl><!-- ZZZ: update the month/day
     <dt>This Version:</dt>
@@ -142,7 +142,7 @@
   <p>The W3C <a href="http://www.w3.org/2008/webapps/">Web Apps Working
    Group</a> is the W3C working group responsible for this specification's
    progress along the W3C Recommendation track. <!--ZZZ:--> This
-   specification is the 26 November 2008 <!--ZZZ "Working Draft"-->Editor's
+   specification is the 16 December 2008 <!--ZZZ "Working Draft"-->Editor's
    Draft. <!--:ZZZ--></p>
   <!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST -->
   <!-- relationship to other work (required) -->
@@ -232,8 +232,8 @@
      <li><a href="#base-urls"><span class=secno>2.2 </span>Base URLs and
       origins of workers</a>
 
-     <li><a href="#the-queue"><span class=secno>2.3 </span>The queue of
-      events</a>
+     <li><a href="#the-event"><span class=secno>2.3 </span>The event loop</a>
+      
 
      <li><a href="#the-workers"><span class=secno>2.4 </span>The worker's
       ports</a>
@@ -1146,9 +1146,7 @@
    "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in the
    normative parts of this document are to be interpreted as described in
    RFC2119. For readability, these words do not appear in all uppercase
-   letters in this specification. <a href="#refsRFC2119">[RFC2119]</a></p>
-  <!-- XXX but they should be
-  marked up -->
+   letters in this specification. <a href="#refsRFC2119">[RFC2119]</a>
 
   <p>Requirements phrased in the imperative as part of algorithms (such as
    "strip any leading space characters" or "return false and abort these
@@ -1197,12 +1195,6 @@
 
   <h3 id=terminology><span class=secno>1.4 </span>Terminology</h3>
 
-  <p>For simplicity, terms such as <em>shown</em>, <em>displayed</em>, and
-   <em>visible</em> might sometimes be used when referring to the way a
-   document is rendered to the user. These terms are not meant to imply a
-   visual medium; they must be considered to apply to other media in
-   equivalent ways.
-
   <p>The construction "a <code title="">Foo</code> object", where <code
    title="">Foo</code> is actually an interface, is sometimes used instead of
    the more accurate "an object implementing the interface <code
@@ -1218,12 +1210,6 @@
    retrieved (e.g. by author script), and is said to be <em>setting</em> when
    a new value is assigned to it.
 
-  <p>If a DOM object is said to be <dfn id=live>live</dfn>, then that means
-   that any attributes returning that object must always return the same
-   object (not a new object each time), and the attributes and methods on
-   that object must operate on the actual underlying data, not a snapshot of
-   the data.
-
   <h2 id=infrastructure><span class=secno>2. </span>Infrastructure</h2>
 
   <p>There are two kinds of workers; dedicated workers, and shared workers.
@@ -1277,12 +1263,9 @@
 
   <ol>
    <li>
-    <p>Create an <code>Event</code> object with the event name <code
-     title=event-close>close</code>, which does not bubble and is not
-     cancelable, and add it to the <code><a
-     href="#workerglobalscope">WorkerGlobalScope</a></code> object's <a
-     href="#queue">queue of events</a>, targetted at the <code><a
-     href="#workerglobalscope">WorkerGlobalScope</a></code> object itself.
+    <p><span>Queue a task</span> to <span>fire a simple event</span> called
+     <code title=event-close>close</code> at the <code><a
+     href="#workerglobalscope">WorkerGlobalScope</a></code> object.
 
    <li>
     <p>Set the worker's <code><a
@@ -1303,13 +1286,14 @@
       <p>Unentangle the two ports.
 
      <li>
-      <p>At the next available opportunity, after any scripts have finished
-       executing<!-- XXX queue -->, <span>fire a simple event</span> called
-       <code title=event-close>close</code> at the other port (the one whose
-       owner is not the <code><a
+      <p><span>Queue a task</span> on the <span>event loop</span> handling
+       events for the other <code>MessagePort</code> (the one whose owner is
+       not the <code><a
        href="#workerglobalscope">WorkerGlobalScope</a></code> object on which
        the <code title=dom-WorkerGlobalScope-close><a
-       href="#close">close()</a></code> method was called).
+       href="#close">close()</a></code> method was called) to <span>fire a
+       simple event</span> called <code title=event-close>close</code> at
+       that other <code>MessagePort</code> object.
     </ol>
   </ol>
 
@@ -1425,29 +1409,21 @@
   <h3 id=base-urls><span class=secno>2.2 </span>Base URLs and origins of
    workers</h3>
 
-  <p>The <span>base URL</span> of a <span>URL</span> passed to an API in a
-   worker is the <span>absolute URL</span> given that the worker's <code
-   title=dom-WorkerGlobalScope-location><a
-   href="#location">location</a></code> attribute represents.
-
   <p>Both the <span>origin</span> and <span>effective script origin</span> of
    scripts running in workers are the <span>origin</span> of the
-   <span>absolute URL</span> given that the worker's <code
+   <span>absolute URL</span> given in that the worker's <code
    title=dom-WorkerGlobalScope-location><a
    href="#location">location</a></code> attribute represents.
 
-  <h3 id=the-queue><span class=secno>2.3 </span>The queue of events</h3>
+  <h3 id=the-event><span class=secno>2.3 </span>The event loop</h3>
 
   <p>Each <code><a href="#workerglobalscope">WorkerGlobalScope</a></code>
-   object is asssociated with a <dfn id=queue>queue of events</dfn>, which is
-   initially empty.
-
-  <p>An event in the queue can be a DOM event or a timeout callback.
-
-  <p>All asynchronous callbacks and events that would be called or dispatched
-   in the worker must be added to the worker's queue, with the "<a
-   href="#run-a">run a worker</a>" processing model below taking care of
-   actually calling the callbacks or dispatching the events.
+   object is asssociated with a <span>event loop</span>. This <span>event
+   loop</span> has no associated <span>browsing context</span>, and its <span
+   title="task queue">task queues</span> only have events, callbacks, and
+   networking activity as <span title=concept-task>tasks</span>. The
+   processing model of these <span title="event loop">event loops</span> is
+   defined below in the <a href="#run-a">run a worker</a> algorithm.
 
   <p>Each <code><a href="#workerglobalscope">WorkerGlobalScope</a></code>
    object also has a <dfn id=closing
@@ -1458,12 +1434,13 @@
   <p>Once the <code><a
    href="#workerglobalscope">WorkerGlobalScope</a></code>'s <a
    href="#closing" title=dom-WorkerGlobalScope-closing>closing</a> flag is
-   set to true, the queue must discard anything else that would be added to
-   it (existing already on the queue is unaffected unless otherwise
-   specified). Effectively, once the <a href="#closing"
-   title=dom-WorkerGlobalScope-closing>closing</a> flag is true, timers stop
-   firing, notifications for all pending asynchronous operations are dropped,
-   etc.
+   set to true, the <span>event loop</span>'s <span title="task queue">task
+   queues</span> must discard any further <span
+   title=concept-task>tasks</span> that would be added to them (tasks already
+   on the queue are unaffected unless otherwise specified). Effectively, once
+   the <a href="#closing" title=dom-WorkerGlobalScope-closing>closing</a>
+   flag is true, timers stop firing, notifications for all pending
+   asynchronous operations are dropped, etc.
 
   <h3 id=the-workers><span class=secno>2.4 </span>The worker's ports</h3>
 
@@ -1479,9 +1456,9 @@
    that have one (but only one) port owned by <var title="">worker global
    scope</var>. This list includes
    <!--all the <code>MessagePort</code> objects that are in events
-  pending in the <span>queue of events</span>, as well as (commented
-  out because in practice it makes no difference either way as far as
-  I can tell, and it would be hard to strictly implement since these
+  pending in the <span>event loop</span>, as well as (commented out
+  because in practice it makes no difference either way as far as I
+  can tell, and it would be hard to strictly implement since these
   ports might not yet be across the thread boundary)-->
    the implicit <code>MessagePort</code> in the case of <a
    href="#dedicatedworkerglobalscope"
@@ -1562,9 +1539,8 @@
 
   <p>When a user agent is to <dfn id=run-a>run a worker</dfn> for a script
    with <span>URL</span> <var title="">url</var>, a browsing context <var
-   title="">owner browsing context</var>, a <code>Document</code> <var
-   title="">owner document</var>, and with global scope <var title="">worker
-   global scope</var>, it must run the following steps:
+   title="">owner browsing context</var>, and with global scope <var
+   title="">worker global scope</var>, it must run the following steps:
 
   <ol>
    <li>
@@ -1573,18 +1549,21 @@
      of these steps asychronously in that context.</p>
 
    <li>
-    <p>Attempt to <span>fetch</span><!-- XXX --> the resource identified by
-     <var title="">url</var>.</p>
+    <p>Attempt to <span>fetch</span> the resource identified by <var
+     title="">url</var>.</p>
 
-    <p>If the attempt fails, then, at the next available opportunity, after
-     any scripts have finished executing<!-- XXX queue -->, <span>fire a
-     simple event</span> called <code title=event-error>error</code> at all
-     <code><a href="#worker1">Worker</a></code> or <code><a
-     href="#sharedworker">SharedWorker</a></code> objects associated with
-     <var title="">worker global scope</var>. Abort these steps.</p>
+    <p>If the attempt fails, then for each <code><a
+     href="#worker1">Worker</a></code> or <code><a
+     href="#sharedworker">SharedWorker</a></code> object associated with <var
+     title="">worker global scope</var>, <span>queue a task</span> to
+     <span>fire a simple event</span> called <code
+     title=event-error>error</code> at that object. Abort these steps.</p>
 
-    <p>If the attempt succeeds, then let <var title="">script</var> be the
-     resource that was obtained.</p>
+    <p>If the attempt succeeds, then let <var title="">source</var> be the
+     text of the resource that was obtained.</p>
+    <!-- XXX do we need
+    to define character encoding decoding here? -->
+    <p>Let <var title="">language</var> be JavaScript.</p>
 
     <p class=note>As with <code>script</code> elements, the MIME type of the
      script is ignored. Unlike with <code>script</code> elements, there is no
@@ -1594,40 +1573,46 @@
     
 
    <li>
-    <p>Create a new <code><a href="#workerlocation">WorkerLocation</a></code>
-     object for the <code title=dom-WorkerGlobalScope-location><a
-     href="#location">location</a></code> attribute of <var title="">worker
-     global scope</var>, representing <var title="">url</var>.</p>
+    <p>A new <span title=concept-script>script</span> is now created, as
+     follows.</p>
 
-   <li>
-    <p>Let <var title="">script</var>'s <span>script execution context</span>
-     (and thus also <span>global object</span>) be <var title="">worker
+    <p>Create a new <span>script execution environment</span> set up as
+     appropriate for the scripting language <var title="">language</var>.</p>
+
+    <p>Parse/compile/initialize <var title="">source</var> using that
+     <span>script execution environment</span>, as appropriate for <var
+     title="">language</var>, and thus obtain a <span>list of code
+     entry-points</span>; set the <i>initial code entry-point</i> to the
+     entry-point for any executable code to be immediately run.</p>
+
+    <p>Set the <span>script's global object</span> to <var title="">worker
      global scope</var>.</p>
 
-   <li>
-    <p>Let <var title="">script</var>'s <span>script browsing context</span>
-     be <var title="">owner browsing context</var>.</p>
+    <p>Set the <span>script's browsing context</span> to <var title="">owner
+     browsing context</var>.</p>
 
-   <li>
-    <p>Let <var title="">script</var>'s <span>script document context</span>
-     be <var title="">owner document</var>.</p>
+    <p>Set the <span>script's character encoding</span> to UTF-8. (This is
+     just used for encoding non-ASCII characters in the query component of
+     URLs.)</p>
+
+    <p>Set the <span>script's base URL</span> to <var title="">url</var>.</p>
+
+    <p>Create a new <span>script group</span> and add the <span
+     title=concept-script>script</span> to it.</p>
 
    <li>
     <p><strong>Closing orphan workers</strong>: Start monitoring the worker
      such that as soon as it stops being either an <a href="#active">active
      needed worker</a> or a <a href="#suspendable">suspendable worker</a>,
-     the <var title="">worker global scope</var>'s <a href="#closing"
+     <var title="">worker global scope</var>'s <a href="#closing"
      title=dom-WorkerGlobalScope-closing>closing</a> flag is set to true and
-     an event named <code title=event-close>close</code>, which uses the
-     <code>Event</code> object, which does not bubble, and which is not
-     cancelable, is added it to <var title="">worker global scope</var>'s
-     <code><a href="#workerglobalscope">WorkerGlobalScope</a></code> object's
-     <a href="#queue">queue of events</a>, targetted at the <var
-     title="">worker global scope</var> itself.</p>
+     <span title="queue a task">a task is queued</span> to <span>fire a
+     simple event</span> called <code title=event-close>close</code> at <var
+     title="">worker global scope</var>.</p>
 
    <li>
     <p><strong>Suspending workers</strong>: Start monitoring the worker, such
-     that whenever the <var title="">worker global scope</var>'s <a
+     that whenever <var title="">worker global scope</var>'s <a
      href="#closing" title=dom-WorkerGlobalScope-closing>closing</a> flag is
      false and the worker is a <a href="#suspendable">suspendable worker</a>,
      the user agent suspends execution of script in that worker until such
@@ -1636,50 +1621,61 @@
      the worker stops being a <a href="#suspendable">suspendable worker</a>.</p>
 
    <li>
-    <p>Run <var title="">script</var> until it either returns, fails to catch
-     an exception, or gets prematurely aborted by the "<a href="#kill-a">kill
-     a worker</a>" or "<a href="#terminate">terminate a worker</a>"
-     algorithms defined below.</p>
+
+   <li>
+    <p><span title="jump to a code entry-point">Jump</span> to the <span
+     title=concept-script>script</span>'s <i>initial code entry-point</i>,
+     and let that run until it either returns, fails to catch an exception,
+     or gets prematurely aborted by the "<a href="#kill-a">kill a worker</a>"
+     or "<a href="#terminate">terminate a worker</a>" algorithms defined
+     below.</p>
 
     <p class=note>If the script gets aborted by the "<a href="#kill-a">kill a
      worker</a>" algorithm, then that same algorithm will cause there to only
-     be a single event in the <a href="#queue">queue of events</a> at the
-     next step, namely the <code title=message-close>close</code> event. The
-     "<a href="#terminate">terminate a worker</a>" algorithm removes all the
+     be a single <span title=concept-task>task</span> in the <span>event
+     loop</span> at the next step, namely the task for the <code
+     title=message-close>close</code> event. The "<a
+     href="#terminate">terminate a worker</a>" algorithm removes all the
      events.</p>
 
    <li>
-    <p><i>Event loop</i>: Wait until either there is an event in the <a
-     href="#queue">queue of events</a> associated with <var title="">worker
-     global scope</var> or the <var title="">worker global scope</var>'s <a
-     href="#closing" title=dom-WorkerGlobalScope-closing>closing</a> flag is
-     set to true.</p>
+    <p><i title="">Event loop</i>: Wait until either there is a <span
+     title=concept-task>task</span> in one of the <span>event loop</span>'s
+     <span title="task queue">task queues</span> or <var title="">worker
+     global scope</var>'s <a href="#closing"
+     title=dom-WorkerGlobalScope-closing>closing</a> flag is set to true.</p>
 
    <li>
-    <p>Dispatch the oldest event or callback in the <a href="#queue">queue of
-     events</a>, if any. The handling of this event or the execution of this
-     callback might get prematurely aborted by the "<a href="#kill-a">kill a
-     worker</a>" or "<a href="#terminate">terminate a worker</a>" algorithms
-     defined below.</p>
+    <p>Run the oldest task on one of the <span>event loop</span>'s <span
+     title="task queue">task queues</span>, if any. The user agent may pick
+     any <span>task queue</span>.</p>
+
+    <p class=note>The handling of events or the execution of callbacks might
+     get prematurely aborted by the "<a href="#kill-a">kill a worker</a>" or
+     "<a href="#terminate">terminate a worker</a>" algorithms defined below.</p>
 
    <li>
-    <p>If there are any more events in the <a href="#queue">queue of
-     events</a> or if the <var title="">worker global scope</var>'s <a
-     href="#closing" title=dom-WorkerGlobalScope-closing>closing</a> flag is
-     set to false, then jump back to the step above labeled <i>event
-     loop</i>.</p>
+    <p>Remove the task run in the previous step, if any, from its <span>task
+     queue</span>.</p>
 
    <li>
-    <p class=big-issue>timers, intervals, XMLHttpRequests, database
-     transactions, etc, must be killed; ports must be unentangled</p>
+    <p>If there are any more events in the <span>event loop</span>'s <span
+     title="task queue">task queues</span> or if <var title="">worker global
+     scope</var>'s <a href="#closing"
+     title=dom-WorkerGlobalScope-closing>closing</a> flag is set to false,
+     then jump back to the step above labeled <i>event loop</i>.</p>
 
    <li>
-    <p>At the next available opportunity, after any scripts have finished
-     executing<!-- XXX queue -->, <span>fire a simple event</span> called
-     <code title=event-close>close</code> at all <code><a
-     href="#worker1">Worker</a></code> or <code><a
-     href="#sharedworker">SharedWorker</a></code> objects associated with
-     this worker.</p>
+    <p>Freeze the <span>script group</span>.</p>
+
+    <p class=note>This kills timers, database transactions, etc.</p>
+
+   <li>
+    <p>For each <code><a href="#worker1">Worker</a></code> or <code><a
+     href="#sharedworker">SharedWorker</a></code> object associated with <var
+     title="">worker global scope</var>, <span>queue a task</span> to
+     <span>fire a simple event</span> called <code
+     title=event-close>close</code> at that object.</p>
   </ol>
 
   <hr>
@@ -1690,16 +1686,13 @@
 
   <ol>
    <li>
-    <p>Create an <code>Event</code> object with the event name <code
-     title=event-close>close</code>, which does not bubble and is not
-     cancelable, and add it to the worker's <code><a
-     href="#workerglobalscope">WorkerGlobalScope</a></code> object's <a
-     href="#queue">queue of events</a>, targetted at the <code><a
-     href="#workerglobalscope">WorkerGlobalScope</a></code> object itself.
+    <p><span>Queue a task</span> to <span>fire a simple event</span> called
+     <code title=event-close>close</code> at the worker's <code><a
+     href="#workerglobalscope">WorkerGlobalScope</a></code> object.
    </li>
-   <!-- XXX shouldn't add one if closing is
-   already true, assuming close has already been added to the queue
-   (?) -->
+   <!-- XXX
+   shouldn't add one if closing is already true, assuming close has
+   already been added to the queue (?) -->
 
    <li>
     <p>Set the worker's <code><a
@@ -1716,13 +1709,14 @@
      shutting down unexpectedly.
 
    <li>
-    <p>If there are any events in the <a href="#queue">queue of events</a>
+    <p>If there are any <span title=concept-task>tasks</span> queued in the
+     <span>event loop</span>'s <span title="task queue">task queues</span>
      other than the <code title=event-close>close</code> event that this
-     algorithm just added, discard them without dispatching them.
+     algorithm just added, discard them without processing them.
 
    <li>
     <p>If the <code title=event-close>close</code> event that this algorithm
-     just added hasn't yet been dispatched, then abort the script currently
+     just queued hasn't yet been dispatched, then abort the script currently
      running in the worker.
 
    <li>
@@ -1755,9 +1749,9 @@
      true.
 
    <li>
-    <p>If there are any events in the <a href="#queue">queue of events</a>
-     other than the <code title=event-close>close</code> event that this
-     algorithm just added, discard them without dispatching them.
+    <p>If there are any <span title=concept-task>tasks</span> queued in the
+     <span>event loop</span>'s <span title="task queue">task queues</span>,
+     discard them without processing them.
 
    <li>
     <p>Abort the script currently running in the worker.
@@ -1875,13 +1869,13 @@
    <li>
     <p><span>Create a new <code><a
      href="#dedicatedworkerglobalscope">DedicatedWorkerGlobalScope</a></code>
-     object</span>. Let this be the <var title="">worker global scope</var>.
+     object</span>. Let <var title="">worker global scope</var> be this new
+     object.
 
    <li>
     <p>Create a new <code><a href="#worker1">Worker</a></code> object,
-     associated with <var title="">worker global scope</var>. Let this
-     <code><a href="#worker1">Worker</a></code> object be <var
-     title="">worker</var>.
+     associated with <var title="">worker global scope</var>. Let <var
+     title="">worker</var> be this new object.
 
    <li>
     <p><span>Create a <code>MessagePort</code> object</span> owned by the
@@ -1893,13 +1887,13 @@
      title="">worker</var>.
 
    <li>
-    <p><span>Create a <code>MessagePort</code> object</span> owned by the
-     <var title="">worker global scope</var>. Let this be the <var
-     title="">inside port</var>.
+    <p><span>Create a <code>MessagePort</code> object</span> owned by <var
+     title="">worker global scope</var>. Let <var title="">inside port</var>
+     be this new object.
 
    <li>
-    <p>Associate the <var title="">inside port</var> with <var
-     title="">worker global scope</var>.
+    <p>Associate <var title="">inside port</var> with <var title="">worker
+     global scope</var>.
 
    <li>
     <p><span>Entangle</span> <var title="">outside port</var> and <var
@@ -1918,12 +1912,11 @@
      queue</span>.
 
    <li>
-    <p><a href="#run-a">Run a worker</a>, with the <span>script browsing
-     context</span> of the script that invoked the method as the <var
-     title="">owner browsing context</var>, with the <span>script document
-     context</span> of the script that invoked the method as the <var
-     title="">owner document</var>, and with <var title="">worker global
-     scope</var> as the global scope.</p>
+    <p><a href="#run-a">Run a worker</a> for the resulting <span>absolute
+     URL</span>, with the <span>script browsing context</span> of the script
+     that invoked the method as the <var title="">owner browsing
+     context</var>, and with <var title="">worker global scope</var> as the
+     global scope.</p>
   </ol>
 
   <h4 id=shared1><span class=secno>2.6.3 </span>Shared workers and the
@@ -2012,7 +2005,7 @@
          global scope</var>.
 
        <li>
-        <p><span>Create a <code>MessagePort</code> object</span> owned by the
+        <p><span>Create a <code>MessagePort</code> object</span> owned by
          <var title="">worker global scope</var>. Let this be the <var
          title="">inside port</var>.
 
@@ -2031,10 +2024,8 @@
          title=dom-MessageEvent-data>data</code> attribute whose value is the
          empty string and has a <code
          title=dom-MessageEvent-messagePort>messagePort</code> attribute
-         whose value is the newly created port, and add it to <var
-         title="">worker global scope</var>'s <a href="#queue">queue of
-         events</a>, targetted at the <var title="">worker global scope</var>
-         itself.
+         whose value is the newly created port, and <span>queue a task</span>
+         to dispatch the event at <var title="">worker global scope</var>.
 
        <li>
         <p>Abort all these steps.
@@ -2043,8 +2034,8 @@
      <li>
       <p><span>Create a new <code><a
        href="#sharedworkerglobalscope">SharedWorkerGlobalScope</a></code>
-       object</span>. Let this be the <var title="">worker global
-       scope</var>.
+       object</span>. Let <var title="">worker global scope</var> be this new
+       object.
 
      <li>
       <p>Associate <var title="">worker</var> with <var title="">worker
@@ -2053,12 +2044,12 @@
      <li>
       <p>Set the <code title=dom-SharedWorkerGlobalScope-name><a
        href="#name">name</a></code> attribute of <var title="">worker global
-       scope</var> be <var title="">name</var>.
+       scope</var> to <var title="">name</var>.
 
      <li>
-      <p><span>Create a <code>MessagePort</code> object</span> owned by the
-       <var title="">worker global scope</var>. Let this be the <var
-       title="">inside port</var>.
+      <p><span>Create a <code>MessagePort</code> object</span> owned by <var
+       title="">worker global scope</var>. Let <var title="">inside
+       port</var> be this new object.
 
      <li>
       <p><span>Entangle</span> <var title="">outside port</var> and <var
@@ -2076,17 +2067,15 @@
      title=dom-MessageEvent-data>data</code> attribute whose value is the
      empty string and has a <code
      title=dom-MessageEvent-messagePort>messagePort</code> attribute whose
-     value is the newly created port, and add it to <var title="">worker
-     global scope</var>'s <a href="#queue">queue of events</a>, targetted at
-     the <var title="">worker global scope</var> itself.
+     value is the newly created port, and <span>queue a task</span> to
+     dispatch the event at <var title="">worker global scope</var>.
 
    <li>
-    <p><a href="#run-a">Run a worker</a>, with the <span>script browsing
-     context</span> of the script that invoked the method as the <var
-     title="">owner browsing context</var>, with the <span>script document
-     context</span> of the script that invoked the method as the <var
-     title="">owner document</var>, and with <var title="">worker global
-     scope</var> as the global scope.</p>
+    <p><a href="#run-a">Run a worker</a> for the resulting <span>absolute
+     URL</span>, with the <span>script browsing context</span> of the script
+     that invoked the method as the <var title="">owner browsing
+     context</var>, and with <var title="">worker global scope</var> as the
+     global scope.</p>
   </ol>
 
   <h2 id=apis-available><span class=secno>3. </span>APIs available to workers</h2>
@@ -2164,30 +2153,29 @@
        complete.</p>
 
       <p>If the fetching attempt failed, throw a <code>NETWORK_ERR</code>
-       exception and abort all these steps. <a
-       href="#refsXHR">[XHR]</a><!-- XXX get DOM Core updated instead
-      --></p>
+       exception and abort all these steps.</p>
 
       <p>If the fetching attempt succeeded, then let <var
-       title="">script</var> be the resource that was obtained.</p>
+       title="">source</var> be the text of the resource that was obtained,
+       and let <var title="">language</var> be JavaScript.</p>
 
       <p class=note>As with the worker's script, the script here is always
        assumed to be JavaScript, regardless of the MIME type.</p>
       <!-- XXX -->
 
      <li>
-      <p>Let <var title="">script</var>'s <span>script execution
-       context</span>, <span>script browsing context</span>, and <span>script
-       document context</span> be the same as for the script that was
-       executed by the <a href="#run-a">run a worker</a> processing model for
-       this worker.</p>
+      <p><span>Create a script</span>, using <var title="">source</var> as
+       the script source and <var title="">language</var> as the scripting
+       language, using the same global object, browsing context, character
+       encoding, base URL, and script group as the <span
+       title=concept-script>script</span> that was created by the worker's <a
+       href="#run-a">run a worker</a> algorithm.</p>
 
-     <li>
-      <p>Parse and execute <var title="">script</var> until it either
-       returns, fails to parse, fails to catch an exception, or gets
-       prematurely aborted by the "<a href="#kill-a">kill a worker</a>" or
-       "<a href="#terminate">terminate a worker</a>" algorithms defined
-       above.</p>
+      <p>Let the newly created <span title=concept-script>script</span> run
+       until it either returns, fails to parse, fails to catch an exception,
+       or gets prematurely aborted by the "<a href="#kill-a">kill a
+       worker</a>" or "<a href="#terminate">terminate a worker</a>"
+       algorithms defined above.</p>
 
       <p>If it failed to parse, then throw a
        <code>SyntaxError</code><!-- XXX ref? --> exception and abort all
Received on Tuesday, 16 December 2008 00:52:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 16 December 2008 00:52:54 GMT