@kookapp/k-jsbridge
v1.0.1
Published
kook-js-bridge
Downloads
6
Keywords
Readme
KOOK JSbridge
支持环境:IOS/ANDOIRD/ELECTRON
npm install @kookapp/k-jsbridge
安装所需依赖包
npm install
运行
//创建bridge
var bridge = new KJSbridge();
//执行native注册的方法
bridge.callHandler("handlerName", params, onResponse);
//注册方法供native调用
bridge.registerHandler("handlerName", (data, callback) => {
console.log("receive native data : ", data);
callback(data); //返回native结果
});