- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 27 Aug 2008 23:16:43 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/workers In directory hutz:/tmp/cvs-serv16966 Modified Files: Overview.html Log Message: Woops, error in the example. (credit: js) (whatwg r60) Index: Overview.html =================================================================== RCS file: /sources/public/html5/workers/Overview.html,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- Overview.html 27 Aug 2008 09:55:18 -0000 1.52 +++ Overview.html 27 Aug 2008 23:16:41 -0000 1.53 @@ -549,7 +549,7 @@ // no longer need this listener worker.port.removeEventListener('message', configure, false); } - worker.addEventListener('message', configure, false); + worker.port.addEventListener('message', configure, false); // MAP function paintMap(event) { @@ -569,7 +569,7 @@ } } } - worker.addEventListener('message', paintMap, false); + worker.port.addEventListener('message', paintMap, false); // PUBLIC CHAT function updatePublicChat(event) { @@ -585,7 +585,7 @@ dd.textContent = message; dialog.appendChild(dd); } - worker.addEventListener('message', updatePublicChat, false); + worker.port.addEventListener('message', updatePublicChat, false); // PRIVATE CHAT function startPrivateChat(event) { @@ -629,7 +629,7 @@ form.appendChild(p); li.appendChild(form); } - worker.addEventListener('message', startPrivateChat, false); + worker.port.addEventListener('message', startPrivateChat, false); </script> </head> <body> @@ -637,16 +637,16 @@ <h2>Map</h2> <p><canvas id="map" height=150 width=150></canvas></p> <p> - <button type=button onclick="worker.postMessage('mov left')">Left</button> - <button type=button onclick="worker.postMessage('mov up')">Up</button> - <button type=button onclick="worker.postMessage('mov down')">Down</button> - <button type=button onclick="worker.postMessage('mov right')">Right</button> - <button type=button onclick="worker.postMessage('set 0')">Set 0</button> - <button type=button onclick="worker.postMessage('set 1')">Set 1</button> + <button type=button onclick="worker.port.postMessage('mov left')">Left</button> + <button type=button onclick="worker.port.postMessage('mov up')">Up</button> + <button type=button onclick="worker.port.postMessage('mov down')">Down</button> + <button type=button onclick="worker.port.postMessage('mov right')">Right</button> + <button type=button onclick="worker.port.postMessage('set 0')">Set 0</button> + <button type=button onclick="worker.port.postMessage('set 1')">Set 1</button> </p> <h2>Public Chat</h2> <dialog id="public"></dialog> - <form onsubmit="worker.postMessage('txt ' + message.value); message.value = ''; return false;"> + <form onsubmit="worker.port.postMessage('txt ' + message.value); message.value = ''; return false;"> <p> <input type="text" name="message" size="50"> <button>Post</button>
Received on Wednesday, 27 August 2008 23:17:17 UTC