summaryrefslogtreecommitdiffstats
path: root/dom/messagechannel/tests/sharedWorker2_messageChannel.js
blob: d5084fe76671331420a977eb11623da8ce183a28 (plain)
1
2
3
4
5
6
7
8
9
/* eslint-env worker */

var mc = new MessageChannel();
var i = 0;

onconnect = function (evt) {
  dump("CONNECTING: " + i + "\n");
  evt.ports[0].postMessage(42, [mc["port" + ++i]]);
};