0.1.5 • Published 8 months ago

@lofter-common-shared/rn-webview-message v0.1.5

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

rn和webview基础协议

rn上的webview 基于 react-native-webview

通信 协议

RN -> webview const run = try { window.lofterMessage(" { "key": "xx", "data": {} } ") } catch(e){};

this.webref.injectJavaScript(run); webview -> RN // webview window.ReactNativeWebView.postMessage("{ "key": "xx", "data": {} }")

// RN <WebView source={{ html }} onMessage={(event) => { JSON.parse(event.nativeEvent.data); }} />

0.1.4

8 months ago

0.1.5

8 months ago

0.1.3

9 months ago

0.1.2

9 months ago

0.1.1

9 months ago