Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-bridge-webview

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-bridge-webview

javascript bridge android/ios webview

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

vue-bridge-webview

javascript bridge android/ios webview

Installation

Browser

  <script src="https://unpkg.com/vue/dist/vue.js"></script>
  <script src="https://unpkg.com/vue-bridge-webview@1.1.0/vue-bridge-webview.js"></script>

Package Managers

npm install vue-bridge-webview --save

import Vue from 'vue'
import VueBridgeWebview from 'vue-bridge-webview'
Vue.use(VueBridgeWebview)

// set default config 
VueBridgeWebview.config(0,true);

Api

syntax format: [this | Vue | window].$bridge.[method]

  • Set global config
$bridge.config(handleDelayTime,silent); // default handleDelayTime = 0 * 1000,silent = false 
  • Android/IOS invoke JS
$bridge.registerHandler : function(name, registerCallback) // callback name, callback function

example: refersh page view
[this|Vue|window].$bridge.registerHandler("refreshPage",function(){
                              document.location.reload();
                          })
  • JS invoke Android/IOS
$bridge.callHandler: function(name,params,callback) // callback name, request params, callback function

example: get userInfo
[this|Vue|window].$bridge.callHandler('getUserInfo',{},function(data){
           ... 
        })

License

MIT Copyright (c) 2016-present, cmp-cc

Keywords

FAQs

Package last updated on 12 Feb 2019

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc