thj-webview-js-bridge

1.0.1 • Public • Published

WebviewJavascriptBridge

Usage

npm install

Javascript API

Register a handler called call return with Promise Example:

call("forward", {type: 1}, function(data) { console.log(data); })

or call global object Example:

WebviewJsBridge.jsCallNative("forward", {type: 1}, function(data) { console.log(data); })
WebviewJsBridge.listenToNativeEmitMessage("networkStateChange", function(data) { console.log('network type: ' + data.networkType); })

Package Sidebar

Install

npm i thj-webview-js-bridge

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

4.3 kB

Total Files

4

Last publish

Collaborators

  • james082