summaryrefslogtreecommitdiffstats
path: root/dom/broadcastchannel/tests/broadcastchannel_worker_alive.js
blob: 78ab44015c7f24ca846c20dd73f7501d358da9f2 (plain)
1
2
3
4
5
6
7
8
(new BroadcastChannel('foobar')).postMessage('READY');

(new BroadcastChannel('foobar')).addEventListener('message', function(event) {
  if (event.data != 'READY') {
    event.target.postMessage(event.data);
  }
}, false);