🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@lofter-common-shared/rn-webview-message

Package Overview
Dependencies
Maintainers
12
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lofter-common-shared/rn-webview-message

rn上的webview 基于 react-native-webview

latest
npmnpm
Version
0.1.10
Version published
Maintainers
12
Created
Source

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); }} />

FAQs

Package last updated on 09 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts