summaryrefslogtreecommitdiffstats
path: root/dom/workers/test/jsversion_worker.js
blob: c66b7297730a70a2c77f4e01957a3ff90b61ca25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
onmessage = function(evt) {
  if (evt.data != 0) {
    var worker = new Worker('jsversion_worker.js');
    worker.onmessage = function(evt) {
      postMessage(evt.data);
    }

    worker.postMessage(evt.data - 1);
    return;
  }

  let foo = 'bar';
  postMessage(true);
}