var bootstrappedData = {},
options = {},
moduleInstances = {},
- eventListeners = [];
+ eventListeners = [],
+ plugins = [];
_.each(_.keys(modules || {}), function(moduleName) {
if(_.contains(app.permissions[moduleName] || [], 'handleEvents')) {
this.getDOM = _.contains(permissions, 'getDOM') ? function() {
return $(options.rootSelector);
} : undefined;
-
+
+ this.getPlugins = function() {
+ return plugins;
+ };
};
this.setBootstrappedData = function(moduleName, data) {
bootstrappedData[moduleName] = data;
};
+
+ this.registerPlugin = function(plugin) {
+ plugins.push(plugin);
+ };
this.start = function(_options) {
options = _.extend({