You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2012/11/07 01:15:20 UTC
[4/8] js commit: correct linting issue stating navigator is ReadOnly,
use passed in context
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 <pu...@gmail.com>
Authored: Tue Nov 6 15:58:23 2012 -0800
Committer: Jesse MacFadyen <pu...@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();