Skip to content

Instantly share code, notes, and snippets.

@jbuffin
Created November 7, 2014 16:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbuffin/be2d90213555416ddbc3 to your computer and use it in GitHub Desktop.
Save jbuffin/be2d90213555416ddbc3 to your computer and use it in GitHub Desktop.
PhoneGap Proxy pattern
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