summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/workers/semantics/multiple-workers/003.js
blob: 14a5a614b3d83bbfa225871d7dfc13cb70ba3192 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
if (location.hash == '#1') {
  var w2 = new Worker('003.js#2');
  w2.onmessage = function(e) {
    postMessage('1'+e.data);
  }
} else if (location.hash == '#2') {
  var w3 = new Worker('003.js#3');
  w3.onmessage = function(e) {
    postMessage('2'+e.data);
  }
} else {
  postMessage('3');
}