sbx-broadcast-channel
v1.0.1
Published
sbx-broadcast-channel
Downloads
3
Readme
sbx-broadcast-channel
npm i --save sbx-broadcast-channel
import SbxBroadcastChannel from 'sbx-broadcast-channel';
function clb(){}
const CHANNEL = new SbxBroadcastChannel('yourChannel');
let data = {someData: ""}
CHANNEL.postMessage(data);
CHANNEL.addEventListener("message", clb)
CHANNEL.removeEventListener("message", clb)