JSBroadCastChannel: Now Cross Your finger
JSChannel
BroadcastChannel
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
});