Last active
August 29, 2015 14:15
-
-
Save danharper/faa9ecfdb925aff4de5c to your computer and use it in GitHub Desktop.
Small wrapper around Ionic's Keyboard plugin for Cordova; works in Browser (https://github.com/driftyco/ionic-plugins-keyboard)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define [], () -> | |
hasCordova = window.cordova? | |
class Keyboard | |
open: -> | |
if hasCordova | |
cordova.plugins.Keyboard.show() | |
else | |
console.info 'would open Keyboard' | |
close: -> | |
if hasCordova | |
cordova.plugins.Keyboard.close() | |
else | |
console.info 'would close Keyboard' | |
return new Keyboard |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment