1 2 3 4
var bc = new BroadcastChannel("sleep"); bc.onmessage = function (e) { bc.postMessage("done!"); };