3 <script src=
"worker_utils.js"></script>
10 document
.getElementById("result").innerHTML
+= message
+ "<br>";
13 var worker
= new Worker("worker_common.js");
14 worker
.postMessage("ping");
15 worker
.onmessage
= workerStarted
;
18 function workerStarted(event
) {
19 log ("worker created");
20 worker
.postMessage("close");
21 sharedWorker
= new SharedWorker("worker_common.js");
22 sharedWorker
.port
.postMessage("ping");
23 sharedWorker
.port
.onmessage
= sharedWorkerStarted
;
26 function sharedWorkerStarted(event
) {
27 log ("shared worker created");
28 sharedWorker
.port
.postMessage("close");