You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2014/04/24 23:11:06 UTC

[21/45] js commit: adding cordova.require fake wrapper

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 <an...@apache.org>
Authored: Thu Mar 27 15:04:34 2014 +0100
Committer: Anis Kadri <an...@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;