輕量級JS消息庫:flyer.js
flyer.js 是一個輕量級的消息庫,開發用于clojurescript & javascript.
它提供了在 frames, iframes, 和 windows之間廣播消息。
功能和操作
- Simple API, from which you can build more elaborate messaging systems.
- Messages are broadcasted to all frames and registered windows, regardless of whether or not they want them (hence, the name)
- Frames can subscribe to specific channels, and can pattern-match to specific topics being sent on that channel
flyer.broadcast({ channel: "default", topic: "person.insert", data: {id: 1, name: "Ben"} }); flyer.broadcast({ channel: "default", topic: "person.delete", data: {id: 1} });
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!