Giter VIP home page Giter VIP logo

choo-cordova's Introduction

choo-cordova

Build Status js-standard-style

Choo hooks for the cordova API

Usage

var choo = require('choo')

var app = choo()

app.use(require('choo-cordova'))

app.route('/', require('./views/main'))
app.mount('#app')

Events

This store emit events for every cordova events. Those events are:

  • 'deviceready'
  • 'pause'
  • 'resume'
  • 'backbutton'
  • 'menubutton'
  • 'searchbutton'
  • 'startcallbutton'
  • 'endcallbutton'
  • 'volumedownbutton'
  • 'volumeupbutton'
  • 'activated'

For further documentation about those, check cordova docs

API

After registering this store, a cordova property will be added to the store. This will have some of the cordova object properties. As the time of writing, this object looks like.

JSON.stringify(choo.state.cordova, null, 2)
"{
  "version": "5.0.3",
  "platformVersion": "5.0.3",
  "platformId": "browser",
  "callbackId": 65806389,
  "callbacks": {},
  "callbackStatus": {
    "NO_RESULT": 0,
    "OK": 1,
    "CLASS_NOT_FOUND_EXCEPTION": 2,
    "ILLEGAL_ACCESS_EXCEPTION": 3,
    "INSTANTIATION_EXCEPTION": 4,
    "MALFORMED_URL_EXCEPTION": 5,
    "IO_EXCEPTION": 6,
    "INVALID_ACTION": 7,
    "JSON_EXCEPTION": 8,
    "ERROR": 9
  },
  "commandProxy": {}
}"

License

MIT

choo-cordova's People

Contributors

yerkopalma avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.