cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [21/45] js commit: adding cordova.require fake wrapper
Date Thu, 24 Apr 2014 21:11:06 GMT
adding cordova.require fake wrapper


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

Branch: refs/heads/master
Commit: f4f5bb605f1611913e378f0ac6998c44bef3e530
Parents: a7e3969
Author: Anis Kadri <anis@apache.org>
Authored: Thu Mar 27 15:04:34 2014 +0100
Committer: Anis Kadri <anis@apache.org>
Committed: Thu Mar 27 15:04:34 2014 +0100

----------------------------------------------------------------------
 src/cordova_b.js | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/f4f5bb60/src/cordova_b.js
----------------------------------------------------------------------
diff --git a/src/cordova_b.js b/src/cordova_b.js
index f4c781e..a00423c 100644
--- a/src/cordova_b.js
+++ b/src/cordova_b.js
@@ -226,4 +226,14 @@ var cordova = {
         });
     }
 };
+
+// FIXME hack: cordova iOS calls cordova.require()
+cordova.require = function(module) {
+  if(module === "cordova/exec") {
+    return cordova.exec;
+  }
+
+  return undefined;
+}
+
 window.cordova = module.exports = cordova;


Mime
View raw message