Skip to content

Instantly share code, notes, and snippets.

@alunny
Created May 20, 2011 19:01
Show Gist options
  • Save alunny/983550 to your computer and use it in GitHub Desktop.
Save alunny/983550 to your computer and use it in GitHub Desktop.
<html>
<body></body>
<script src="phonegap.js"></script>
<script>
function assert(msg, booleanCondition) {
if (!booleanCondition) {
alert("assertion failed: " + msg);
return false;
} else {
return true;
}
}
document.addEventListener('deviceready', function () {
assert("device.uuid is defined", typeof device.uuid == "string");
}, false);
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment