incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fil...@apache.org
Subject git commit: [CB-499] requirejs on iOS messes up cordova-js initialization. have to listen for DOMContentLoaded sooner
Date Wed, 18 Apr 2012 20:49:00 GMT
Updated Branches:
  refs/heads/master 44f82b8e6 -> 2a8cdb98b


[CB-499] requirejs on iOS messes up cordova-js initialization. have to listen for DOMContentLoaded
sooner


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/2a8cdb98
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/2a8cdb98
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/2a8cdb98

Branch: refs/heads/master
Commit: 2a8cdb98b764fcdd513d049ea5a35d95c3a119e2
Parents: 44f82b8
Author: Fil Maj <maj.fil@gmail.com>
Authored: Wed Apr 18 13:50:59 2012 -0700
Committer: Fil Maj <maj.fil@gmail.com>
Committed: Wed Apr 18 13:50:59 2012 -0700

----------------------------------------------------------------------
 lib/cordova.js           |   11 +++++++++++
 lib/scripts/bootstrap.js |   14 --------------
 2 files changed, 11 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/2a8cdb98/lib/cordova.js
----------------------------------------------------------------------
diff --git a/lib/cordova.js b/lib/cordova.js
index e155b4f..e9cd5da 100644
--- a/lib/cordova.js
+++ b/lib/cordova.js
@@ -1,4 +1,15 @@
 var channel = require('cordova/channel');
+
+/**
+ * Listen for DOMContentLoaded and notify our channel subscribers.
+ */
+document.addEventListener('DOMContentLoaded', function() {
+    channel.onDOMContentLoaded.fire();
+}, false);
+if (document.readyState == 'complete') {
+    channel.onDOMContentLoaded.fire();
+}
+
 /**
  * Intercept calls to addEventListener + removeEventListener and handle deviceready,
  * resume, and pause events.

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/2a8cdb98/lib/scripts/bootstrap.js
----------------------------------------------------------------------
diff --git a/lib/scripts/bootstrap.js b/lib/scripts/bootstrap.js
index 5452561..9c3252f 100755
--- a/lib/scripts/bootstrap.js
+++ b/lib/scripts/bootstrap.js
@@ -2,20 +2,6 @@
     var channel = require("cordova/channel"),
         _self = {
             boot: function () {
-                //---------------
-                // Event handling
-                //---------------
-
-                /**
-                 * Listen for DOMContentLoaded and notify our channel subscribers.
-                 */
-                document.addEventListener('DOMContentLoaded', function() {
-                    channel.onDOMContentLoaded.fire();
-                }, false);
-                if (document.readyState == 'complete') {
-                  channel.onDOMContentLoaded.fire();
-                }
-
                 /**
                  * Create all cordova objects once page has fully loaded and native side
is ready.
                  */


Mime
View raw message