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/03/27 15:22:39 UTC
[30/34] js commit: removing onPluginsReady and setting platform exec
removing onPluginsReady and setting platform exec
Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/df0e0823
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/df0e0823
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/df0e0823
Branch: refs/heads/browserify
Commit: df0e08236b4b177bfe13316c83ab3e5d66249bed
Parents: 77fbf3a
Author: Anis Kadri <an...@apache.org>
Authored: Wed Mar 26 17:27:30 2014 +0100
Committer: Anis Kadri <an...@apache.org>
Committed: Thu Mar 27 15:20:22 2014 +0100
----------------------------------------------------------------------
src/common/channel.js | 1 +
src/common/init_b.js | 19 +++++--------------
2 files changed, 6 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-js/blob/df0e0823/src/common/channel.js
----------------------------------------------------------------------
diff --git a/src/common/channel.js b/src/common/channel.js
index 653af15..f3d83df 100644
--- a/src/common/channel.js
+++ b/src/common/channel.js
@@ -235,6 +235,7 @@ channel.createSticky('onNativeReady');
channel.createSticky('onCordovaReady');
// Event to indicate that all automatically loaded JS plugins are loaded and ready.
+// FIXME remove this
channel.createSticky('onPluginsReady');
// Event to indicate that Cordova is ready
http://git-wip-us.apache.org/repos/asf/cordova-js/blob/df0e0823/src/common/init_b.js
----------------------------------------------------------------------
diff --git a/src/common/init_b.js b/src/common/init_b.js
index efcb6cf..288c5a5 100644
--- a/src/common/init_b.js
+++ b/src/common/init_b.js
@@ -21,11 +21,12 @@
var channel = require('cordova/channel');
var cordova = require('cordova');
-//var modulemapper = require('cordova/modulemapper');
var platform = require('cordova/platform');
-var pluginloader = require('cordova/pluginloader');
-var platformInitChannelsArray = [channel.onNativeReady, channel.onPluginsReady];
+var platformInitChannelsArray = [channel.onNativeReady];
+
+// setting exec
+cordova.exec = require('cordova/exec');
function logUnfiredChannels(arr) {
for (var i = 0; i < arr.length; ++i) {
@@ -96,23 +97,14 @@ if (window._nativeReady) {
channel.onNativeReady.fire();
}
-//modulemapper.clobbers('cordova', 'cordova');
-//modulemapper.clobbers('cordova/exec', 'cordova.exec');
-//modulemapper.clobbers('cordova/exec', 'Cordova.exec');
-
// Call the platform-specific initialization.
platform.bootstrap && platform.bootstrap();
-pluginloader.load(function() {
- channel.onPluginsReady.fire();
-});
-
/**
* Create all cordova objects once native side is ready.
*/
channel.join(function() {
-// modulemapper.mapModules(window);
-
+
platform.initialize && platform.initialize();
// Fire event to notify that all objects are created
@@ -126,4 +118,3 @@ channel.join(function() {
}, channel.deviceReadyChannelsArray);
}, platformInitChannelsArray);
-