Skip to content

Instantly share code, notes, and snippets.

// wrap in a closure to get at the global,
// no matter where we are.
(function () { this.env = this.env || "prod" })()
// in production mode, be fast.
// in development/testing mode, add some error checking.
function Class (ctor, parent, proto) {
if (typeof parent === "object") {
proto = parent
parent = null
<script>
function getPicture() {
navigator.camera.getPicture(getPicture_Success, null, { quality: 10 });
};
function getPicture_Success(imageData) {
alert("getpic success");
document.getElementById("test_img").src = "data:image/jpeg;base64," + imageData;
}
</script>