cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leonardo Martínez <>
Subject OnDeviceReady with unstable behaviour
Date Wed, 13 Aug 2014 17:43:24 GMT

I am new here and I got into this mailing list because of this strange

The thing is that sometimes the ondeviceready event is not triggerred and
sometimes it is. I could say like the first time the windows is opened
("...") ) it is not triggered but going back (to another
window) and in again it's triggered.

I have this in the HTML:

<body onload="onLoad()">
        <div id="mainDiv">
            <div id="deviceready" class="blink">
                <p class="event listening">Connecting to Device</p>
                <p class="event received">Device is Ready</p>


And this function in JS:

function onLoad() {
document.addEventListener("deviceready", onDeviceReady, false);
alert("I was set");

function onDeviceReady() {

I am working with Cordova 3.5.0-0.2.4 and this is happening in iOS. Not on
Android with the same code.

Hope you can help me. Thanks!


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message