npm

Does your artifact manager get in the way? Join us on Oct. 8 at 10am PT, to discuss how npm can help.Sign up »

webviewbridgeclient

1.0.1 • Public • Published

WebViewBridgeClient

Client-side component of WebViewJavascriptBridge for sending messages between native code and WebViews on iOS.

Usage

npm install --save webviewbridgeclient

See complete example WebViewJavascriptBridge

import getBridge from 'webviewbridgeclient'
 
getBridge().then(bridge => {
   bridge.registerHandler('JS Echo', (data, responseCallback) => {
        console.log("JS Echo called with:", data)
        responseCallback(data)
    })
 
    bridge.callHandler('ObjC Echo', {'key': 'value'}).then(responseData => {
        console.log("JS received response:", responseData)
    })
})

Credits

Basic client side bridge code from WebViewJavascriptBridge

install

npm i webviewbridgeclient

Downloadsweekly downloads

2

version

1.0.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability