1.0.1 • Published 9 years ago

cordova-back-stack v1.0.1

Weekly downloads
4
License
ISC
Repository
github
Last release
9 years ago

#cordova-back-stack

Create and manage stacks of cordova 'backbutton' event listeners.

Usage

Install:

npm install cordova-back-stack

Create a persistent handler:

backStack = require('cordova-back-handler')


backStack(function myCoolBackButtonHandler(event) {
    // Do cool back button handling
})

Meanwhile in another file create a removeable handler:

backStack = require('cordova-back-handler')

var thing.removeHandler = backStack(function myCoolBackButtonHandler(event) {
    // Do cool back button handling
    thing.removeHandler(); // Remove the handler from the stack.
})