Created
November 7, 2014 16:13
-
-
Save jbuffin/be2d90213555416ddbc3 to your computer and use it in GitHub Desktop.
PhoneGap Proxy pattern
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
window.PGProxy = { | |
navigator : { | |
camera : { | |
getPicture : function(a, b, c) { | |
if(navigator.camera) { | |
return navigator.camera.getPicture(a, b, c); | |
} else { | |
console.log('navigator.camera.getPicture'); | |
a('imageData'); | |
} | |
} | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment