@cqlinkoff/wk-bridge

1.1.2 • Public • Published

wk-bridge

Bridge between Native and Web, based on WKWebView and compatible Android

node npm license Build Status Standard - JavaScript Style Guide Coverage Status

Install

npm i @cqlinkoff/wk-bridge

Use

import WKBridge from '@cqlinkoff/wk-bridge'

const bridge = new WKBridge({
  namespace: 'namespace'
})

bridge.postMessage(handler, data)

API

new WKBridge(options)

create WKBridge instance

  • options:

    • namespace: namespace which inject by Android WebView

postMessage(handler, data)

call native method

  • handler: native method name
  • data: arguments

Package Sidebar

Install

npm i @cqlinkoff/wk-bridge

Weekly Downloads

1

Version

1.1.2

License

MIT

Unpacked Size

9.49 kB

Total Files

5

Last publish

Collaborators

  • kagawa