Hi,

We use cordova with GWT (on iOS) and we ran into a situation where the 
1) "document.addEventListener('DOMContentLoaded', function()..." in the boot 
sequence is called after the event has already fired
2) BUT the document.readyState is NOT YET 'complete' but 'loaded' 

CURRENT code in cordova.js
>>
            boot: function () {
                //---------------
                // Event handling
                //---------------

                /**
                 * Listen for DOMContentLoaded and notify our channel 
subscribers.
                 */
                document.addEventListener('DOMContentLoaded', function() {
                    alert("loaded");
                    channel.onDOMContentLoaded.fire();
                }, false);
                if (document.readyState == 'complete') {
                    //alert("ready");
                  channel.onDOMContentLoaded.fire();
                }
<<

thus I suggest to change it too 

>>
            boot: function () {
                //---------------
                // Event handling
                //---------------

                /**
                 * Listen for DOMContentLoaded and notify our channel 
subscribers.
                 */
                document.addEventListener('DOMContentLoaded', function() {
                    alert("loaded");
                    channel.onDOMContentLoaded.fire();
                }, false);
                if (document.readyState == 'complete' || document.readyState == 
'loaded') {
                    //alert("ready");
                  channel.onDOMContentLoaded.fire();
                }
<<


This seems to affect different target platforms, at least iOS and android.

Best wishes,

Robert

Reply via email to