fixed up things so that deviceready now uses DOMContentLoaded and if DCL fires before something is attached to deviceready the function will be called immediately

This commit is contained in:
Dave Johnson
2010-07-20 11:25:55 -07:00
parent 27c4de6aa0
commit f7a4a0aef8
6 changed files with 325 additions and 143 deletions
+1 -5
View File
@@ -12,8 +12,6 @@
document.getElementById("platform").innerHTML = device.platform;
document.getElementById("version").innerHTML = device.version;
document.getElementById("uuid").innerHTML = device.uuid;
console.log("Height:" + window.innerHeight);
console.log("Width:" + window.innerWidth);
}
var getLocation = function() {
@@ -114,9 +112,7 @@
function init(){
document.addEventListener("touchmove", preventBehavior, false);
document.addEventListener("deviceready", deviceInfo, true);
}
}
</script>
</head>