react-native-webview-bus:让 React Native 与 webview 页面互通的 Event bus,帮助快速实现 Hybrid 应用

时间:2021-04-27 14:38:09
【文件属性】:
文件名称:react-native-webview-bus:让 React Native 与 webview 页面互通的 Event bus,帮助快速实现 Hybrid 应用
文件大小:13KB
文件格式:ZIP
更新时间:2021-04-27 14:38:09
JavaScript react-native-webview-bus 让 React Native 与 webview 页面互通的 Event bus,帮助快速实现 Hybrid 应用 Install npm install react-native-webview-bus --save Api WebviewBus:WebviewBus 类,var webviewBus = new WebviewBus(window or webview) webviewBus.on(event, handler):添加跨端的事件监听器,如 web 端调用则监听 native 端发送的事件,反之亦然 webviewBus.once(event, handler):添加跨端的单次事件监听器,同 webviewBus.on webviewBus.off(event, handler):取消跨端的事件监听器 webviewBus
【文件预览】:
react-native-webview-bus-master
----.eslintrc(558B)
----src()
--------WebviewBus.js(4KB)
----.babelrc(160B)
----gulpfile.js(25B)
----LICENSE(1KB)
----build()
--------rollup.config.js(598B)
--------build.js(922B)
----README.md(4KB)
----dist()
--------react-native-webview-bus.js(5KB)
--------react-native-webview-bus.js.map(6KB)
----.gitignore(884B)
----index.js(69B)
----package.json(1KB)

网友评论