javascript web workers - how do I pass arguments?
<p>Found the answer some some of my problems, html5 web workers!!!</p>

<p>How do I pass an argument to a web worker though using this basic example?</p>

<p>contents of worker.js:</p>

<pre><code>function doSomething() {
    postMessage( ' done');
}
setTimeout ( "doSomething()", 3000 );
</code></pre>

<p>js code:</p>

<pre><code> var worker = new Worker('worker.js');
  worker.onmessage = function (event) {
    alert(event.data);
  };
</code></pre>
