JSBroadCastChannel: Now Cross Your finger

JSChannel

  • JSChannel Doc
  • JSChannel Code
  • JSChannel in Render JS

BroadcastChannel

  • BroadcastChannel Polyfill

Example Receiver

chan = JSBroadcastChannel.build({scope: "message",  debugOutput: true});
chan.bind("reverse", function(trans, s) {
    console.log(trans);
    console.log(s);
    return s.split("").reverse().join("");
});

Example Sender

emit = function(e){console.log(e);};
chan2 = JSBroadcastChannel.build({scope: "message", debugOutput: true});
chan2.call({
    method: "reverse",
    params: "hello world!",
    timeout: 50,
    error: emit,
    success: emit
});