Notify.init("../core/notify.html", null, "Duplex");
Notify.receive(function (obj) {
console.log(obj);
});
//send内容随意,这里只做演示
Notify.send({ from: 'which tab', message: 'your message'});
git clone https://github.com/doubi-NO1/TabMessage.git
cd TabMessage
node server.js
浏览器打开两个选项卡,分别输入http://localhost:9090/test/tab1.html和http://localhost:9090/test/tab2.html
MIT