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

html5/workers Overview.html,1.280,1.281

From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 13 Apr 2011 22:10:12 +0000
To: public-html-commits@w3.org
Message-Id: <E1QA8GK-0000o8-Tb@lionel-hutz.w3.org>
Update of /sources/public/html5/workers
In directory hutz:/tmp/cvs-serv3090

Modified Files:
	Overview.html 
Log Message:
pipeline update (whatwg r6003)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/workers/Overview.html,v
retrieving revision 1.280
retrieving revision 1.281
diff -u -d -r1.280 -r1.281
--- Overview.html	12 Apr 2011 00:10:43 -0000	1.280
+++ Overview.html	13 Apr 2011 22:10:10 -0000	1.281
@@ -1,7 +1,4 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"><!-- when publishing, change bits marked ZZZ
-     ZZZ: Set PUB to 1 for TR/ drafts, 0 for dev drafts; PUB-Y lines are used if it's 1 and PUB-N lines if it's 0.
-     ZZZ: Set YEAR, SHORTDAY (month/day), and LONGDAY accordingly. They are used by the INSERT FOO bits below.
-  --><html lang="en-US-x-Hixie"><title>Web Workers</title><style type="text/css">
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"><html lang="en-US-x-Hixie"><title>Web Workers</title><style type="text/css">
    pre { margin-left: 2em; white-space: pre-wrap; }
    h2 { margin: 3em 0 1em 0; }
    h3 { margin: 2.5em 0 1em 0; }
@@ -229,13 +226,12 @@
    <p><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p>
 
    <h1>Web Workers</h1>
-   <!--<h2 class="no-num no-toc">(subtitle)</h2>-->
-   <h2 class="no-num no-toc" id="editor-s-draft-12-april-2011">Editor's Draft 12 April 2011</h2>
+   
+   <h2 class="no-num no-toc" id="editor-s-draft-13-april-2011">Editor's Draft 13 April 2011</h2>
    <dl><dt>Latest Published Version:</dt>
     <dd><a href="http://www.w3.org/TR/workers/">http://www.w3.org/TR/workers/</a></dd>
     <dt>Latest Editor's Draft:</dt>
     <dd><a class="latest-link" href="http://dev.w3.org/html5/workers/">http://dev.w3.org/html5/workers/</a></dd>
-<!-- ZZZ: add the new version after it has shipped-->
     <dt>Previous Versions:</dt>
     <dd><a href="http://www.w3.org/TR/2011/WD-workers-20110310/">http://www.w3.org/TR/2011/WD-workers-20110310/</a></dd>
     <dd><a href="http://www.w3.org/TR/2011/WD-workers-20110208/">http://www.w3.org/TR/2011/WD-workers-20110208/</a></dd>
@@ -265,12 +261,12 @@
   </div><hr class="top"><h2 class="no-num no-toc" id="abstract">Abstract</h2><p>This specification defines an API that allows Web application
   authors to spawn background workers running scripts in parallel to
   their main page. This allows for thread-like operation with
-  message-passing as the coordination mechanism.<h2 class="no-num no-toc" id="status-of-this-document">Status of This document</h2><!-- intro boilerplate (required) --><p><em>This section describes the status of this document at the
+  message-passing as the coordination mechanism.<h2 class="no-num no-toc" id="status-of-this-document">Status of This document</h2><p><em>This section describes the status of this document at the
   time of its publication. Other documents may supersede this
   document. A list of current W3C publications and the most recently
   formally published revision of this technical report can be found in
   the <a href="http://www.w3.org/TR/">W3C technical reports index</a>
-  at http://www.w3.org/TR/.</em></p><!-- where to send feedback (required) --><p>If you wish to make comments regarding this document in a manner
+  at http://www.w3.org/TR/.</em></p><p>If you wish to make comments regarding this document in a manner
   that is tracked by the W3C, please submit them via using <a href="http://www.w3.org/Bugs/Public/enter_bug.cgi?product=HTML%20WG">our
   public bug database</a>. If you do not have an account then you can
   enter feedback using this form:<form action="http://www.whatwg.org/specs/web-apps/current-work/file-spam.cgi" method="post">
@@ -308,14 +304,14 @@
   <a href="http://lists.w3.org/Archives/Public/public-webapps/">archives</a>),
   or <a href="mailto:whatwg@whatwg.org">whatwg@whatwg.org</a> (<a href="http://lists.whatwg.org/listinfo.cgi/whatwg-whatwg.org">subscribe</a>,
   <a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/">archives</a>).
-  All feedback is welcome.</p><!-- stability (required) --><p>Implementors should be aware that this specification is not
+  All feedback is welcome.</p><p>Implementors should be aware that this specification is not
   stable. <strong>Implementors who are not taking part in the
   discussions are likely to find the specification changing out from
   under them in incompatible ways.</strong> Vendors interested in
   implementing this specification before it eventually reaches the
   Candidate Recommendation stage should join the aforementioned
   mailing lists and take part in the discussions.<div id="multipage-common">
-  </div><!-- version history or list of changes (required) --><p>The latest
+  </div><p>The latest
   stable version of the editor's draft of this specification is always
   available on <a href="http://dev.w3.org/html5/workers/">the W3C CVS server</a>
   and in the <a href="http://svn.whatwg.org/webapps/">WHATWG
@@ -334,8 +330,8 @@
   </dl><p>The W3C <a href="http://www.w3.org/2008/webapps/">Web Applications
   Working Group</a> is the W3C working group responsible for this
   specification's progress along the W3C Recommendation track.
-  This specification is the 12 April 2011 Editor's Draft.
-  </p><!-- required patent boilerplate --><p>This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5
+  This specification is the 13 April 2011 Editor's Draft.
+  </p><p>This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5
   February 2004 W3C Patent Policy</a>. W3C maintains a <a href="http://www.w3.org/2004/01/pp-impl/42538/status" rel="disclosure">public list of
   any patent disclosures</a> made in connection with the deliverables
   of the group; that page also includes instructions for disclosing a
@@ -343,7 +339,6 @@
   individual believes contains <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential
   Claim(s)</a> must disclose the information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section
   6 of the W3C Patent Policy</a>.<h2 class="no-num no-toc" id="contents">Table of Contents</h2>
-<!--begin-toc-->
 <ol class="toc">
  <li><a href="#introduction"><span class="secno">1 </span>Introduction</a>
   <ol>
@@ -385,7 +380,7 @@
    <li><a href="#worker-locations"><span class="secno">5.4 </span>Worker locations</a></ol></li>
  <li><a class="no-num" href="#references">References</a></li>
  <li><a class="no-num" href="#acknowledgements">Acknowledgements</a></ol>
-<!--end-toc--><hr><h2 id="introduction"><span class="secno">1 </span>Introduction</h2><h3 id="scope"><span class="secno">1.1 </span>Scope</h3><p><i>This section is non-normative.</i><p>This specification defines an API for running scripts in the
+<hr><h2 id="introduction"><span class="secno">1 </span>Introduction</h2><h3 id="scope"><span class="secno">1.1 </span>Scope</h3><p><i>This section is non-normative.</i><p>This specification defines an API for running scripts in the
   background independently of any user interface scripts.<p>This allows for long-running scripts that are not interrupted by
   scripts that respond to clicks or other user interactions, and
   allows long tasks to be executed without yielding to keep the page
@@ -930,251 +925,9 @@
   close();
 }</pre><p>They receive two numbers in two events, perform the computation
   for the range of numbers thus specified, and then report the result
-  back to the parent.<p><a href="http://www.whatwg.org/demos/workers/multicore/page.html">View this example online</a>.</p><!--(this uses startConversation, which is currently commented out)
-
-  <h4>Providing libraries</h4>
-
-  <!- -END dev-html- -><p><i>This section is non-normative.</i></p><!- -START dev-html- ->
-
-  <p>Suppose that a cryptography library is made available that
-  provides three tasks:</p>
-
-  <dl>
-
-   <dt>Generate a public/private key pair</dt>
-
-   <dd>Takes a port, on which it will send two messages, first the
-   public key and then the private key.</dd>
-
-   <dt>Given a plaintext and a public key, return the corresponding cyphertext</dt>
-
-   <dd>Takes a port, to which any number of messages can be sent, the
-   first giving the public key, and the remainder giving the
-   plaintext, each of which is encrypted and then sent on that same
-   channel as the cyphertext. The user can close the port when it is
-   done encrypting content.</dd>
-
-   <dt>Given a cyphertext and a private key, return the corresponding plaintext</dt>
-
-   <dd>Takes a port, to which any number of messages can be sent, the
-   first giving the private key, and the remainder giving the
-   cyphertext, each of which is decrypted and then sent on that same
-   channel as the plaintext. The user can close the port when it is
-   done decrypting content.</dd>
-
-  </dl>
-
-  <p>The library itself is as follows:</p>
-
-  <pre>function handleMessage(e) {
-  if (e.data == "genkeys")
-    genkeys(e.ports[0]);
-  else if (e.data == "encrypt")
-    encrypt(e.ports[0]);
-  else if (e.data == "decrypt")
-    decrypt(e.ports[0]);
-}
-
-function genkeys(p) {
-  var keys = _generateKeyPair();
-  p.postMessage(keys[0]);
-  p.postMessage(keys[1]);
-}
-
-function encrypt(p) {
-  var key, state = 0;
-  p.onmessage = function (e) {
-    if (state == 0) {
-      key = e.data;
-      state = 1;
-    } else {
-      p.postMessage(_encrypt(key, e.data));
-    }
-  };
-}
-
-function decrypt(p) {
-  var key, state = 0;
-  p.onmessage = function (e) {
-    if (state == 0) {
-      key = e.data;
-      state = 1;
-    } else {
-      p.postMessage(_decrypt(key, e.data));
-    }
-  };
-}
-
-// support being used as a shared worker as well as a dedicated worker
-if ('onmessage' in this) // dedicated worker
-  onmessage = handleMessage;
-else // shared worker
-  onconnect = function (e) { e.port.onmessage = handleMessage; }
-
-
-// the "crypto" functions:
-
-function _generateKeyPair() {
-  return [Math.random(), Math.random()];
-}
-
-function _encrypt(k, s) {
-  return 'encrypted-' + k + ' ' + s;
-}
-
-function _decrypt(k, s) {
-  return s.substr(s.indexOf(' ')+1);
-}</pre>
-
-  <p>Note that the crypto functions here are just stubs and don't do
-  real cryptography.</p>
-
-  <p>This library could be used as follows:</p>
-
-  <pre>&lt;!DOCTYPE HTML>
-&lt;html>
- &lt;head>
-  &lt;title>Worker example: Crypto library&lt;/title>
-  &lt;script>
-   var cryptoLib = new Worker('libcrypto-v1.js'); // or could use 'libcrypto-v2.js'
-   function getKeys() {
-     var state = 0;
-     cryptoLib.startConversation("genkeys").onmessage = function (e) {
-       if (state == 0)
-         document.getElementById('public').value = e.data;
-       else if (state == 1)
-         document.getElementById('private').value = e.data;
-       state += 1;
-     };
-   }
-   function enc() {
-     var port = cryptoLib.startConversation("encrypt");
-     port.postMessage(document.getElementById('public').value);
-     port.postMessage(document.getElementById('input').value);
-     port.onmessage = function (e) {
-       document.getElementById('input').value = e.data;
-       port.close();
-     };
-   }
-   function dec() {
-     var port = cryptoLib.startConversation("decrypt");
-     port.postMessage(document.getElementById('private').value);
-     port.postMessage(document.getElementById('input').value);
-     port.onmessage = function (e) {
-       document.getElementById('input').value = e.data;
-       port.close();
-     };
-   }
-  &lt;/script>
-  &lt;style>
-   textarea { display: block; }
-  &lt;/style>
- &lt;/head>
- &lt;body onload="getKeys()">
-  &lt;fieldset>
-   &lt;legend>Keys&lt;/legend>
-   &lt;p>&lt;label>Public Key: &lt;textarea id="public">&lt;/textarea>&lt;/label>&lt;/p>
-   &lt;p>&lt;label>Private Key: &lt;textarea id="private">&lt;/textarea>&lt;/label>&lt;/p>
-  &lt;/fieldset>
-  &lt;p>&lt;label>Input: &lt;textarea id="input">&lt;/textarea>&lt;/label>&lt;/p>
-  &lt;p>&lt;button onclick="enc()">Encrypt&lt;/button> &lt;button onclick="dec()">Decrypt&lt;/button>&lt;/p>
- &lt;/body>
-&lt;/html></pre>
-
-  <p>A later version of the API, though, might want to offload all the
-  crypto work onto subworkers. This could be done as follows:</p>
-
-  <pre>function handleMessage(e) {
-  if (e.data == "genkeys")
-    genkeys(e.ports[0]);
-  else if (e.data == "encrypt")
-    encrypt(e.ports[0]);
-  else if (e.data == "decrypt")
-    decrypt(e.ports[0]);
-}
-
-function genkeys(p) {
-  var generator = new Worker('libcrypto-v2-generator.js');
-  generator.postMessage('', [p]);
-}
-
-function encrypt(p) {
-  p.onmessage = function (e) {
-    var key = e.data;
-    var encryptor = new Worker('libcrypto-v2-encryptor.js');
-    encryptor.postMessage(key, [p]);
-  };
-}
-
-function encrypt(p) {
-  p.onmessage = function (e) {
-    var key = e.data;
-    var decryptor = new Worker('libcrypto-v2-decryptor.js');
-    decryptor.postMessage(key, [p]);
-  };
-}
-
-// support being used as a shared worker as well as a dedicated worker
-if ('onmessage' in this) // dedicated worker
-  onmessage = handleMessage;
-else // shared worker
-  onconnect = function (e) { e.ports[0].onmessage = handleMessage };
-</pre>
-
-  <p>The little subworkers would then be as follows.</p>
-
-  <p>For generating key pairs:</p>
-
-  <pre>onmessage = function (e) {
-  var k = _generateKeyPair();
-  e.ports[0].postMessage(k[0]);
-  e.ports[0].postMessage(k[1]);
-  close();
-}
-
-function _generateKeyPair() {
-  return [Math.random(), Math.random()];
-}</pre>
-
-  <p>For encrypting:</p>
-
-  <pre>onmessage = function (e) {
-  var key = e.data;
-  e.ports[0].onmessage = function (e) {
-    var s = e.data;
-    postMessage(_encrypt(key, s));
-  }
-}
-
-function _encrypt(k, s) {
-  return 'encrypted-' + k + ' ' + s;
-}</pre>
-
-  <p>For decrypting:</p>
-
-  <pre>onmessage = function (e) {
-  var key = e.data;
-  e.ports[0].onmessage = function (e) {
-    var s = e.data;
-    postMessage(_decrypt(key, s));
-  }
-}
-
-function _decrypt(k, s) {
-  return s.substr(s.indexOf(' ')+1);
-}</pre>
-
-  <p>Notice how the users of the API don't have to even know that this
-  is happening &mdash; the API hasn't changed; the library can
-  delegate to subworkers without changing its API, even though it is
-  accepting data using message channels.</p>
-
-  <p><a href="http://www.whatwg.org/demos/workers/crypto/page.html">View this example online</a>.</p>
-
-(end startConversation block) (beware nested comments)--><h2 id="conformance-requirements"><span class="secno">2 </span>Conformance requirements</h2><p>All diagrams, examples, and notes in this specification are
+  back to the parent.<p><a href="http://www.whatwg.org/demos/workers/multicore/page.html">View this example online</a>.</p><h2 id="conformance-requirements"><span class="secno">2 </span>Conformance requirements</h2><p>All diagrams, examples, and notes in this specification are
   non-normative, as are all sections explicitly marked non-normative.
-  Everything else in this specification is normative.<p>The key words "MUST", "MUST NOT", "REQUIRED", <!--"SHALL", "SHALL
-  NOT",--> "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
+  Everything else in this specification is normative.<p>The key words "MUST", "MUST NOT", "REQUIRED",  "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>Requirements phrased in the imperative as part of algorithms
@@ -1240,8 +993,7 @@
   readonly attribute <a href="#workerlocation">WorkerLocation</a> <a href="#dom-workerglobalscope-location" title="dom-WorkerGlobalScope-location">location</a>;
 
   void <a href="#dom-workerglobalscope-close" title="dom-WorkerGlobalScope-close">close</a>();
-<!-- v2-onclose           attribute <span>Function</span> <span title="handler-WorkerGlobalScope-onclose">onclose</span>;
--->           attribute <span>Function</span> <a href="#handler-workerglobalscope-onerror" title="handler-WorkerGlobalScope-onerror">onerror</a>;
+           attribute <span>Function</span> <a href="#handler-workerglobalscope-onerror" title="handler-WorkerGlobalScope-onerror">onerror</a>;
 };
 <a href="#workerglobalscope">WorkerGlobalScope</a> implements <a href="#workerutils">WorkerUtils</a>;
 <a href="#workerglobalscope">WorkerGlobalScope</a> implements <span>EventTarget</span>;</pre><p>The <dfn id="dom-workerglobalscope-self" title="dom-WorkerGlobalScope-self"><code>self</code></dfn> attribute
@@ -1255,11 +1007,6 @@
    have been added to the <span>event loop</span>'s <span title="task
    queue">task queues</span>.</p>
 
-<!-- v2-onclose
-   <li><p><span>Queue a task</span> to <span>fire a simple
-   event</span> named <code title="event-close">close</code> at the
-   <code>WorkerGlobalScope</code> object.</p></li>
--->
 
    <li><p>Set the worker's <code><a href="#workerglobalscope">WorkerGlobalScope</a></code> object's
    <a href="#dom-workerglobalscope-closing" title="dom-WorkerGlobalScope-closing">closing</a> flag to
@@ -1270,25 +1017,20 @@
   event types</span>) that must be supported, as IDL attributes, by
   objects implementing the <code><a href="#workerglobalscope">WorkerGlobalScope</a></code>
   interface:<table><thead><tr><th><span title="event handlers">Event handler</span> <th><span>Event handler event type</span>
-   <tbody><!-- v2-onclose    <tr><td><dfn title="handler-WorkerGlobalScope-onclose"><code>onclose</code></dfn> <td> <code title="event-close">close</code> --><tr><td><dfn id="handler-workerglobalscope-onerror" title="handler-WorkerGlobalScope-onerror"><code>onerror</code></dfn> <td> <code title="event-error">error</code>
+   <tbody><tr><td><dfn id="handler-workerglobalscope-onerror" title="handler-WorkerGlobalScope-onerror"><code>onerror</code></dfn> <td> <code title="event-error">error</code>
   </table><hr><p>The <code><a href="#workerglobalscope">WorkerGlobalScope</a></code> interface must not exist if
   the interface's <span>relevant namespace object</span> is a
   <code>Window</code> object. <a href="#refsWEBIDL">[WEBIDL]</a><h4 id="dedicated-workers-and-the-dedicatedworkerglobalscope-interface"><span class="secno">4.1.2 </span>Dedicated workers and the <code><a href="#dedicatedworkerglobalscope">DedicatedWorkerGlobalScope</a></code> interface</h4><pre class="idl">[Supplemental, NoInterfaceObject]
 interface <dfn id="dedicatedworkerglobalscope">DedicatedWorkerGlobalScope</dfn> : <a href="#workerglobalscope">WorkerGlobalScope</a> {
-  void <a href="#dom-dedicatedworkerglobalscope-postmessage" title="dom-DedicatedWorkerGlobalScope-postMessage">postMessage</a>(in any message, in optional <span>MessagePortArray</span> ports);<!--
-  <span>MessagePort</span> <span title="dom-DedicatedWorkerGlobalScope-startConversation">startConversation</span>(in any message);-->
-           attribute <span>Function</span> <a href="#handler-dedicatedworkerglobalscope-onmessage" title="handler-DedicatedWorkerGlobalScope-onmessage">onmessage</a>;
+  void <a href="#dom-dedicatedworkerglobalscope-postmessage" title="dom-DedicatedWorkerGlobalScope-postMessage">postMessage</a>(in any message, in optional <span>MessagePortArray</span> ports);           attribute <span>Function</span> <a href="#handler-dedicatedworkerglobalscope-onmessage" title="handler-DedicatedWorkerGlobalScope-onmessage">onmessage</a>;
 };</pre><p><code><a href="#dedicatedworkerglobalscope">DedicatedWorkerGlobalScope</a></code> objects act as if they
   had an implicit <code>MessagePort</code> associated with them. This
   port is part of a channel that is set up when the worker is created,
   but it is not exposed. This object must never be garbage collected
   before the <code><a href="#dedicatedworkerglobalscope">DedicatedWorkerGlobalScope</a></code> object.<p>All messages received by that port must immediately be retargeted
-  at the <code><a href="#dedicatedworkerglobalscope">DedicatedWorkerGlobalScope</a></code> object.<p>The <dfn id="dom-dedicatedworkerglobalscope-postmessage" title="dom-DedicatedWorkerGlobalScope-postMessage"><code>postMessage()</code></dfn><!--
-  and <dfn
-  title="dom-DedicatedWorkerGlobalScope-startConversation"><code>startConversation()</code></dfn>-->
-  method<!--s (startConversation)--> on
+  at the <code><a href="#dedicatedworkerglobalscope">DedicatedWorkerGlobalScope</a></code> object.<p>The <dfn id="dom-dedicatedworkerglobalscope-postmessage" title="dom-DedicatedWorkerGlobalScope-postMessage"><code>postMessage()</code></dfn>  method on
   <code><a href="#dedicatedworkerglobalscope">DedicatedWorkerGlobalScope</a></code> objects must act as if, when
-  invoked, it<!--/they (startConversation)--> immediately invoked the
+  invoked, it immediately invoked the
   method of the same name on the port, with the same arguments, and
   returned the same return value.<p>The following are the <span>event handlers</span> (and their
   corresponding <span title="event handler event type">event handler
@@ -1320,8 +1062,7 @@
   <a href="#run-a-worker">run a worker</a> algorithm takes care of associating the
   worker with an <span>application cache</span>.<p class="note">The <code title="dom-SharedWorkerGlobalScope-applicationCache">applicationCache</code>
   attribute returns the <code>ApplicationCache</code> object for the
-  worker.</p><!-- normative conf criteria is in the appcache section
-  --><h3 id="origins-of-workers"><span class="secno">4.2 </span>Origins of workers</h3><p>Both the <span>origin</span> and <span>effective script
+  worker.</p><h3 id="origins-of-workers"><span class="secno">4.2 </span>Origins of workers</h3><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 in that
   the worker's <code title="dom-WorkerGlobalScope-location"><a href="#dom-workerglobalscope-location">location</a></code> attribute
@@ -1347,11 +1088,7 @@
   consists of all the <code>MessagePort</code> objects that are
   entangled with another port and 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>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
+   the implicit
   <code>MessagePort</code> in the case of <a href="#dedicatedworkerglobalscope" title="DedicatedWorkerGlobalScope">dedicated workers</a>.<p>Each <code><a href="#workerglobalscope">WorkerGlobalScope</a></code> also has a list of <dfn id="the-worker-s-workers">the
   worker's workers</dfn>. Initially this list is empty; it is
   populated when the worker creates or obtains further workers.<p>Finally, each <code><a href="#workerglobalscope">WorkerGlobalScope</a></code> also has a list of
@@ -1363,8 +1100,7 @@
   <var title="">d</var>, <a href="#add-a-document-to-the-worker-s-documents" title="add a document to the worker's
   documents">add <var title="">d</var> to <var title="">q</var>'s
   <code>WorkerGlobalScope</code> owner's list of <span>the worker's
-  <code>Document</code>s</span></a>.</p><!-- suggestions welcome
-  on making this sentence into understandable English --><p>Whenever a <code>Document</code> object is <span title="discard a
+  <code>Document</code>s</span></a>.</p><p>Whenever a <code>Document</code> object is <span title="discard a
   Document">discarded</span>, it must be removed from the list of
   <a href="#the-worker-s-documents">the worker's <code>Document</code>s</a> of each worker
   whose list contains that <code>Document</code>.<p>Given a <span>script's global object</span> <var title="">o</var>
@@ -1415,9 +1151,7 @@
 
     <p>Attempt to <span>fetch</span> the resource identified by <var title="">url</var>, from the <var title="">owner origin</var>,
     with the <i>synchronous flag</i> set and the <i>force same-origin
-    flag</i> set.</p> <!-- not http-origin privacy sensitive (looking
-    forward to CORS) -->
-
+    flag</i> set.</p> 
     <p>If the attempt fails, then for each <code><a href="#worker">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> named <code title="event-error">error</code> at that object. Abort these
@@ -1476,10 +1210,7 @@
     worker</a>, and no later than it stops being a
     <a href="#permissible-worker">permissible worker</a>, <var title="">worker global
     scope</var>'s <a href="#dom-workerglobalscope-closing" title="dom-WorkerGlobalScope-closing">closing</a> flag is set
-    to true<!-- v2-onclose and <span title="queue a task">a task is
-    queued</span> to <span>fire a simple event</span> named <code
-    title="event-close">close</code> at <var title="">worker global
-    scope</var>-->.</p>
+    to true.</p>
 
    </li>
 
@@ -1505,15 +1236,6 @@
     "<a href="#kill-a-worker">kill a worker</a>" or "<a href="#terminate-a-worker">terminate a worker</a>"
     algorithms defined below.</p>
 
-<!-- v2-onclose
-    <p class="note">If the script gets aborted by the "<span>kill a
-    worker</span>" algorithm, then that same algorithm will cause
-    there to only 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
-    "<span>terminate a worker</span>" algorithm removes all the
-    events.</p>
--->
 
    </li>
 
@@ -1582,54 +1304,20 @@
 
    </li>
 
-<!-- v2-onclose
-   <li>
-
-    <p>For each <code>Worker</code> or <code>SharedWorker</code>
-    object associated with <var title="">worker global scope</var>,
-    <span>queue a task</span> to <span>fire a simple event</span>
-    named <code title="event-close">close</code> at that object.</p>
-
-   </li>
--->
   </ol><hr><p>When a user agent is to <dfn id="kill-a-worker">kill a worker</dfn> it must
   run the following steps in parallel with the worker's main loop (the
-  "<a href="#run-a-worker">run a worker</a>" processing model defined above):<ol><!-- v2-onclose
-   <li><p>If the worker's <code>WorkerGlobalScope</code> object's
-   <span title="dom-WorkerGlobalScope-closing">closing</span> flag is
-   false, <span>queue a task</span> to <span>fire a simple
-   event</span> named <code title="event-close">close</code> at the
-   worker's <code>WorkerGlobalScope</code> object.</p></li>
---><li><p>Set the worker's <code><a href="#workerglobalscope">WorkerGlobalScope</a></code> object's <a href="#dom-workerglobalscope-closing" title="dom-WorkerGlobalScope-closing">closing</a> flag to
+  "<a href="#run-a-worker">run a worker</a>" processing model defined above):<ol><li><p>Set the worker's <code><a href="#workerglobalscope">WorkerGlobalScope</a></code> object's <a href="#dom-workerglobalscope-closing" title="dom-WorkerGlobalScope-closing">closing</a> flag to
    true.</li>
 
-<!-- v2-onclose
-   <li><p>Wait a user-agent-defined amount of time. If the "<span>run
-   a worker</span>" processing model defined above immediately starts
-   running event listeners registered for the <code
-   title="event-close">close</code> event, this time should not be
-   zero &mdash; the idea is that the <code
-   title="event-close">close</code> event can be used to clean up
-   when shutting down unexpectedly.</p></li>
--->
 
    <li><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><!-- v2-onclose other than the <code
-   title="event-close">close</code> event that this algorithm just
-   added-->, discard them without processing them.</li>
+   queue">task queues</span>, discard them without processing them.</li>
 
-<!-- v2-onclose
-   <li><p>If the <code title="event-close">close</code> event that
-   this algorithm just queued hasn't yet been dispatched, then abort
-   the script currently running in the worker.</p></li>
--->
 
    <li><p>Wait a user-agent-defined amount of time.</li>
 
-   <li><p>Abort the script currently running in the worker<!--
-   v2-onclose (if any script is running, then it will be a handler for
-   the <code title="event-close">close</code> event)-->.</li>
+   <li><p>Abort the script currently running in the worker.</li>
 
   </ol><p>User agents may invoke the "<a href="#kill-a-worker">kill a worker</a>"
   processing model on a worker at any time, e.g. in response to user
@@ -1700,21 +1388,17 @@
   script.<h3 id="creating-workers"><span class="secno">4.7 </span>Creating workers</h3><h4 id="the-abstractworker-abstract-interface"><span class="secno">4.7.1 </span>The <code><a href="#abstractworker">AbstractWorker</a></code> abstract interface</h4><pre class="idl">[Supplemental, NoInterfaceObject]
 interface <dfn id="abstractworker">AbstractWorker</dfn> {
            attribute <span>Function</span> <a href="#handler-abstractworker-onerror" title="handler-AbstractWorker-onerror">onerror</a>;
-<!-- v2-onclose           attribute <span>Function</span> <span title="handler-AbstractWorker-onclose">onclose</span>; -->
 };
 <a href="#abstractworker">AbstractWorker</a> implements <span>EventTarget</span>;</pre><p>The following are the <span>event handlers</span> (and their
   corresponding <span title="event handler event type">event handler
   event types</span>) that must be supported, as IDL attributes, by
   objects implementing the <code><a href="#abstractworker">AbstractWorker</a></code> interface:<table><thead><tr><th><span title="event handlers">Event handler</span> <th><span>Event handler event type</span>
    <tbody><tr><td><dfn id="handler-abstractworker-onerror" title="handler-AbstractWorker-onerror"><code>onerror</code></dfn> <td> <code title="event-error">error</code>
-<!-- v2-onclose    <tr><td><dfn title="handler-AbstractWorker-onclose"><code>onclose</code></dfn> <td> <code title="event-close">close</code> -->
   </table><h4 id="dedicated-workers-and-the-worker-interface"><span class="secno">4.7.2 </span>Dedicated workers and the <code><a href="#worker">Worker</a></code> interface</h4><pre class="idl">[<a href="#dom-worker" title="dom-Worker">Constructor</a>(in DOMString scriptURL)]
 interface <dfn id="worker">Worker</dfn> : <a href="#abstractworker">AbstractWorker</a> {
   void <a href="#dom-worker-terminate" title="dom-Worker-terminate">terminate</a>();
 
-  void <a href="#dom-worker-postmessage" title="dom-Worker-postMessage">postMessage</a>(in any message, in optional <span>MessagePortArray</span> ports);<!--
-  <span>MessagePort</span> <span title="dom-Worker-startConversation">startConversation</span>(in any message);-->
-           attribute <span>Function</span> <a href="#handler-worker-onmessage" title="handler-Worker-onmessage">onmessage</a>;
+  void <a href="#dom-worker-postmessage" title="dom-Worker-postMessage">postMessage</a>(in any message, in optional <span>MessagePortArray</span> ports);           attribute <span>Function</span> <a href="#handler-worker-onmessage" title="handler-Worker-onmessage">onmessage</a>;
 };</pre><p>The <dfn id="dom-worker-terminate" title="dom-Worker-terminate"><code>terminate()</code></dfn> method,
   when invoked, must cause the "<a href="#terminate-a-worker">terminate a worker</a>"
   algorithm to be run on the worker with with the object is
@@ -1723,11 +1407,8 @@
   a channel that is set up when the worker is created, but it is not
   exposed. This object must never be garbage collected before the
   <code><a href="#worker">Worker</a></code> object.<p>All messages received by that port must immediately be retargeted
-  at the <code><a href="#worker">Worker</a></code> object.<p>The <dfn id="dom-worker-postmessage" title="dom-Worker-postMessage"><code>postMessage()</code></dfn><!--
-  and <dfn
-  title="dom-Worker-startConversation"><code>startConversation()</code></dfn>-->
-  method<!--s (startConversation)--> on <code><a href="#worker">Worker</a></code> objects
-  must act as if, when invoked, it<!--/they (startConversation)-->
+  at the <code><a href="#worker">Worker</a></code> object.<p>The <dfn id="dom-worker-postmessage" title="dom-Worker-postMessage"><code>postMessage()</code></dfn>  method on <code><a href="#worker">Worker</a></code> objects
+  must act as if, when invoked, it
   immediately invoked the method of the same name on the port, with
   the same arguments, and returned the same return value.<p>The following are the <span>event handlers</span> (and their
   corresponding <span title="event handler event type">event handler
@@ -1783,10 +1464,6 @@
    <li><p>Return <var title="">worker</var>, and run the following
    steps asynchronously.</li>
 
-<!-- (this is done by the "run a worker" algorithm)
-   <li><p>Enable <var title="">inside port</var>'s <span>port message
-   queue</span>.</p></li>
--->
 
    <li><p>Enable <var title="">outside port</var>'s <span>port message
    queue</span>.</li>
@@ -2054,22 +1731,13 @@
    <li><p>If any fail, throw a <code>SYNTAX_ERR</code>
    exception.</li>
 
-<!--
-   <li><p>If any of the resulting <span title="absolute URL">absolute
-   URLs</span> have an <span>origin</span> that is not the <span
-   title="same origin">same</span> as the origin of the script that
-   invoked the method, then throw a <code>SECURITY_ERR</code>
-   exception.</p></li>
--->
 
    <li>
 
     <p>Attempt to <span>fetch</span> each resource identified by the
     resulting <span title="absolute URL">absolute URLs</span>, from
     the <span>entry script</span>'s <span>origin</span>, with the
-    <i>synchronous flag</i> set.</p> <!-- not http-origin privacy
-    sensitive -->
-
+    <i>synchronous flag</i> set.</p> 
    </li>
 
    <li>
@@ -2202,17 +1870,11 @@
   
   <p>The <code><a href="#workerlocation">WorkerLocation</a></code> interface must not exist if the
   interface's <span>relevant namespace object</span> is a
-  <code>Window</code> object. <a href="#refsWEBIDL">[WEBIDL]</a><h2 class="no-num" id="references">References</h2><!--REFS--><p>All references are normative unless marked "Non-normative".</p><!-- Dates are only included for standards older than the Web, because the newer ones keep changing. --><dl><dt id="refsDOMCORE">[DOMCORE]</dt>
+  <code>Window</code> object. <a href="#refsWEBIDL">[WEBIDL]</a><h2 class="no-num" id="references">References</h2><p>All references are normative unless marked "Non-normative".</p><dl><dt id="refsDOMCORE">[DOMCORE]</dt>
    <dd><cite><a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html">Web DOM Core</a></cite>, A. van Kesteren. W3C.</dd>
 
    <dt id="refsDOMEVENTS">[DOMEVENTS]</dt>
-   <!--
-   <dd><cite><a
-   href="http://www.w3.org/TR/DOM-Level-3-Events/">Document Object
-   Model (DOM) Level 3 Events Specification</a></cite>,
-   B. H&ouml;hrmann, P. Le Hegaret, T. Pixley. W3C.</dd>
-   -->
-   <dd><cite><a href="http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html">Document
+      <dd><cite><a href="http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html">Document
    Object Model (DOM) Level 3 Events Specification</a></cite>,
    D. Schepers. W3C.</dd>
 
@@ -2229,19 +1891,11 @@
    RFCs to Indicate Requirement Levels</a></cite>, S. Bradner. IETF.</dd>
 
    <dt id="refsWEBIDL">[WEBIDL]</dt>
-   <!--
-   <dd><cite><a href="http://www.w3.org/TR/WebIDL/">Web
-   IDL</a></cite>, C. McCormack. W3C.</dd>
-   -->
-   <dd><cite><a href="http://dev.w3.org/2006/webapi/WebIDL/">Web
+      <dd><cite><a href="http://dev.w3.org/2006/webapi/WebIDL/">Web
    IDL</a></cite>, C. McCormack. W3C.</dd>
 
    <dt id="refsXHR">[XHR]</dt>
-   <!--
-   <dd><cite><a href="http://www.w3.org/TR/XMLHttpRequest/">The XMLHttpRequest
-   Object</a></cite>, A. van Kesteren. W3C.</dd>
-   -->
-   <dd><cite><a href="http://dev.w3.org/2006/webapi/XMLHttpRequest-2/"><code>XMLHttpRequest</code></a></cite>,
+      <dd><cite><a href="http://dev.w3.org/2006/webapi/XMLHttpRequest-2/"><code>XMLHttpRequest</code></a></cite>,
    A. van Kesteren. W3C.</dd>
 
   </dl><h2 class="no-num" id="acknowledgements">Acknowledgements</h2><!-- ACKS --><p>Thanks to
Received on Wednesday, 13 April 2011 22:10:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 13 April 2011 22:19:30 GMT