cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [4/8] js commit: correct linting issue stating navigator is ReadOnly, use passed in context
Date Wed, 07 Nov 2012 00:15:20 GMT
correct linting issue stating navigator is ReadOnly, use passed in context


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/d86cd3ec
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/d86cd3ec
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/d86cd3ec

Branch: refs/heads/master
Commit: d86cd3eca0e721e9d2dbb23d4c3ef12c52eea8db
Parents: 9ac1d0d
Author: Jesse MacFadyen <purplecabbage@gmail.com>
Authored: Tue Nov 6 15:58:23 2012 -0800
Committer: Jesse MacFadyen <purplecabbage@gmail.com>
Committed: Tue Nov 6 15:58:23 2012 -0800

----------------------------------------------------------------------
 lib/scripts/bootstrap.js |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/d86cd3ec/lib/scripts/bootstrap.js
----------------------------------------------------------------------
diff --git a/lib/scripts/bootstrap.js b/lib/scripts/bootstrap.js
index 02a0319..58ca32d 100644
--- a/lib/scripts/bootstrap.js
+++ b/lib/scripts/bootstrap.js
@@ -22,10 +22,10 @@
 (function (context) {
     // Replace navigator before any modules are required(), to ensure it happens as soon
as possible.
     // We replace it so that properties that can't be clobbered can instead be overridden.
-    if (typeof navigator != 'undefined') {
+    if (typeof context.navigator != 'undefined') {
         var CordovaNavigator = function () {};
-        CordovaNavigator.prototype = navigator;
-        navigator = new CordovaNavigator();
+        CordovaNavigator.prototype = context.navigator;
+        context.navigator = new CordovaNavigator();
     }
 
     var channel = require("cordova/channel"),
@@ -40,15 +40,15 @@
                         platform = require('cordova/platform');
 
                     // Drop the common globals into the window object, but be nice and don't
overwrite anything.
-                    builder.build(base.objects).intoButDoNotClobber(window);
+                    builder.build(base.objects).intoButDoNotClobber(context);
 
                     // Drop the platform-specific globals into the window object
                     // and clobber any existing object.
-                    builder.build(platform.objects).intoAndClobber(window);
+                    builder.build(platform.objects).intoAndClobber(context);
 
                     // Merge the platform-specific overrides/enhancements into
                     // the window object.
-                    builder.build(platform.merges).intoAndMerge(window);
+                    builder.build(platform.merges).intoAndMerge(context);
 
                     // Call the platform-specific initialization
                     platform.initialize();


Mime
View raw message