Skip to content

Instantly share code, notes, and snippets.

@gnarl
Created June 24, 2011 14:31
Show Gist options
  • Save gnarl/1044875 to your computer and use it in GitHub Desktop.
Save gnarl/1044875 to your computer and use it in GitHub Desktop.
onDeviceReady
function onDeviceReady()
{
console.log('********************************* onDeviceReady');
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onFileSystemSuccess, fail);
}
function onBodyLoad()
{
console.log('********************************* onBodyLoad');
if (typeof navigator.device == "undefined") {
console.log('********************************* onBodyLoad - addEventListener');
document.addEventListener("deviceready", onDeviceReady, false);
} else {
console.log('********************************* onBodyLoad - onDeviceReady');
onDeviceReady();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment