[html5] r5838 - [e] (0) Comment out an example that uses startConversation(), which isn't yet in [...]
whatwg at whatwg.org
whatwg at whatwg.org
Mon Feb 7 14:16:29 PST 2011
Author: ianh
Date: 2011-02-07 14:16:28 -0800 (Mon, 07 Feb 2011)
New Revision: 5838
Modified:
complete.html
source
Log:
[e] (0) Comment out an example that uses startConversation(), which isn't yet in the spec (it's commented out also).
Modified: complete.html
===================================================================
--- complete.html 2011-02-07 21:40:54 UTC (rev 5837)
+++ complete.html 2011-02-07 22:16:28 UTC (rev 5838)
@@ -1023,8 +1023,7 @@
<li><a href=#worker-used-for-background-i/o><span class=secno>9.1.2.3 </span>Worker used for background I/O</a></li>
<li><a href=#shared-workers-introduction><span class=secno>9.1.2.4 </span>Shared workers introduction</a></li>
<li><a href=#shared-state-using-a-shared-worker><span class=secno>9.1.2.5 </span>Shared state using a shared worker</a></li>
- <li><a href=#delegation><span class=secno>9.1.2.6 </span>Delegation</a></li>
- <li><a href=#providing-libraries><span class=secno>9.1.2.7 </span>Providing libraries</a></ol></ol></li>
+ <li><a href=#delegation><span class=secno>9.1.2.6 </span>Delegation</a></ol></ol></li>
<li><a href=#infrastructure-0><span class=secno>9.2 </span>Infrastructure</a>
<ol>
<li><a href=#the-global-scope><span class=secno>9.2.1 </span>The global scope</a>
@@ -71757,16 +71756,19 @@
<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)
- <h5 id=providing-libraries><span class=secno>9.1.2.7 </span>Providing libraries</h5>
+ <h5>Providing libraries</h5>
- <p><i>This section is non-normative.</i></p>
+ <!- -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>
+ <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>
@@ -71786,8 +71788,10 @@
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>
+ </dl>
+ <p>The library itself is as follows:</p>
+
<pre>function handleMessage(e) {
if (e.data == "genkeys")
genkeys(e.ports[0]);
@@ -71853,12 +71857,12 @@
<p>This library could be used as follows:</p>
- <pre><!DOCTYPE HTML>
-<html>
- <head>
- <title>Worker example: Crypto library</title>
- <script>
- var crytoLib = new Worker('libcrypto-v1.js'); // or could use 'libcrypto-v2.js'
+ <pre><!DOCTYPE HTML>
+<html>
+ <head>
+ <title>Worker example: Crypto library</title>
+ <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) {
@@ -71887,21 +71891,21 @@
port.close();
};
}
- </script>
- <style>
+ </script>
+ <style>
textarea { display: block; }
- </style>
- </head>
- <body onload="getKeys()">
- <fieldset>
- <legend>Keys</legend>
- <p><label>Public Key: <textarea id="public"></textarea></label></p>
- <p><label>Private Key: <textarea id="private"></textarea></label></p>
- </fieldset>
- <p><label>Input: <textarea id="input"></textarea></label></p>
- <p><button onclick="enc()">Encrypt</button> <button onclick="dec()">Decrypt</button></p>
- </body>
-</html></pre>
+ </style>
+ </head>
+ <body onload="getKeys()">
+ <fieldset>
+ <legend>Keys</legend>
+ <p><label>Public Key: <textarea id="public"></textarea></label></p>
+ <p><label>Private Key: <textarea id="private"></textarea></label></p>
+ </fieldset>
+ <p><label>Input: <textarea id="input"></textarea></label></p>
+ <p><button onclick="enc()">Encrypt</button> <button onclick="dec()">Decrypt</button></p>
+ </body>
+</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>
@@ -71991,9 +71995,12 @@
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>
+ <p><a href="http://www.whatwg.org/demos/workers/crypto/page.html">View this example online</a>.</p>
+(end startConversation block) (beware nested comments)-->
+
+
<h3 id=infrastructure-0><span class=secno>9.2 </span>Infrastructure</h3>
<p>There are two kinds of workers; dedicated workers, and shared
Modified: source
===================================================================
--- source 2011-02-07 21:40:54 UTC (rev 5837)
+++ source 2011-02-07 22:16:28 UTC (rev 5838)
@@ -81287,10 +81287,11 @@
<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)
<h5>Providing libraries</h5>
- <!--END dev-html--><p><i>This section is non-normative.</i></p><!--START dev-html-->
+ <!- -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>
@@ -81357,6 +81358,9 @@
<p><a href="http://www.whatwg.org/demos/workers/crypto/page.html">View this example online</a>.</p>
+(end startConversation block) (beware nested comments)-->
+
+
<!--END complete--><!--END epub-->
<!--FIXUP whatwg-workers +1-->
<!--FIXUP workers +1-->
More information about the Commit-Watchers
mailing list