1.0.1 • Published 5 years ago

app-web-launcher v1.0.1

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

app-web-launcher

Build Status

This is a function that could open Native App from HTML page when some events are triggered.

install

npm i app-web-launcher -S

usage

<button onclick="goto"> open by app <button>
const AppLauncher = require('app-web-launcher')
const appLauncher = new AppLauncher()
function goto() {
   appLauncher.launch({
     deepLink: "****",
     url: "****",
     pressCb: () => {/*todo*/},
     failCb: () => {/*todo*/}
   })
}

options

keytypevalue
ctxObjectcallback's context, default is window
deeplinkStringapp's deeplink, must
urlStringdownload url if no app, must
pressCbFunctioncallback when events were triggered, not must
failCbFunctioncallback when no app, not must
1.0.1

5 years ago

1.0.0

5 years ago