Hacking in the firing of the event

This commit is contained in:
Joe Bowser 2009-11-10 17:35:56 -08:00
parent 8dcfe18112
commit 72a6748987

View File

@ -8,8 +8,9 @@
<link rel="stylesheet" href="master.css" type="text/css" media="screen" title="no title" charset="utf-8"> <link rel="stylesheet" href="master.css" type="text/css" media="screen" title="no title" charset="utf-8">
<script type="text/javascript" charset="utf-8" src="phonegap.js"></script> <script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
var deviceInfo = function(){ var deviceInfo = function(){
console.log('setting the dom nodes');
document.getElementById("platform").innerHTML = device.platform; document.getElementById("platform").innerHTML = device.platform;
document.getElementById("version").innerHTML = device.version; document.getElementById("version").innerHTML = device.version;
document.getElementById("uuid").innerHTML = device.uuid; document.getElementById("uuid").innerHTML = device.uuid;
@ -102,9 +103,12 @@
function init(){ function init(){
document.addEventListener("touchmove", preventBehavior, false); document.addEventListener("touchmove", preventBehavior, false);
setTimeout(deviceInfo, 1); document.addEventListener("deviceReady", deviceInfo, true);
console.log('we are in init');
} }
</script> </script>
</head> </head>
<body onload="init();" id="stage" class="theme"> <body onload="init();" id="stage" class="theme">