cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [1/2] js commit: Verify that window.cordova does not already exist and throw error if it does
Date Thu, 19 Mar 2015 18:27:06 GMT
Repository: cordova-js
Updated Branches:
  refs/heads/master 74c6c8936 -> b4af1c5ec


Verify that window.cordova does not already exist and throw error if it does


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

Branch: refs/heads/master
Commit: 59bd041f7f8eedad937ad211c6b714901b032ec5
Parents: 214f9d3
Author: Jesse MacFadyen <purplecabbage@gmail.com>
Authored: Mon Mar 16 14:42:47 2015 -0700
Committer: Jesse MacFadyen <purplecabbage@gmail.com>
Committed: Mon Mar 16 14:42:47 2015 -0700

----------------------------------------------------------------------
 src/cordova.js   | 2 ++
 src/cordova_b.js | 2 ++
 2 files changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/59bd041f/src/cordova.js
----------------------------------------------------------------------
diff --git a/src/cordova.js b/src/cordova.js
index da3fdbe..1f1b92d 100644
--- a/src/cordova.js
+++ b/src/cordova.js
@@ -19,6 +19,8 @@
  *
 */
 
+if ("cordova" in window) { throw new Error("cordova already defined"); };
+
 
 var channel = require('cordova/channel');
 var platform = require('cordova/platform');

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/59bd041f/src/cordova_b.js
----------------------------------------------------------------------
diff --git a/src/cordova_b.js b/src/cordova_b.js
index 71d546b..82facf5 100644
--- a/src/cordova_b.js
+++ b/src/cordova_b.js
@@ -19,6 +19,8 @@
  *
 */
 
+if ("cordova" in window) { throw new Error("cordova already defined"); };
+
 /*global symbolList*/
 
 var channel = require('cordova/channel');


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message