fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
editor: update old transform api calls to new way of calling transformations
[fnpeditor.git]
/
src
/
fnpjs
/
runner.js
diff --git
a/src/fnpjs/runner.js
b/src/fnpjs/runner.js
index
0da2916
..
eeef9f9
100644
(file)
--- a/
src/fnpjs/runner.js
+++ b/
src/fnpjs/runner.js
@@
-12,7
+12,8
@@
var Runner = function(app, modules) {
var bootstrappedData = {},
options = {},
moduleInstances = {},
var bootstrappedData = {},
options = {},
moduleInstances = {},
- eventListeners = [];
+ eventListeners = [],
+ plugins = [];
_.each(_.keys(modules || {}), function(moduleName) {
if(_.contains(app.permissions[moduleName] || [], 'handleEvents')) {
_.each(_.keys(modules || {}), function(moduleName) {
if(_.contains(app.permissions[moduleName] || [], 'handleEvents')) {
@@
-53,13
+54,20
@@
var Runner = function(app, modules) {
this.getDOM = _.contains(permissions, 'getDOM') ? function() {
return $(options.rootSelector);
} : undefined;
this.getDOM = _.contains(permissions, 'getDOM') ? function() {
return $(options.rootSelector);
} : undefined;
-
+
+ this.getPlugins = function() {
+ return plugins;
+ };
};
this.setBootstrappedData = function(moduleName, data) {
bootstrappedData[moduleName] = data;
};
};
this.setBootstrappedData = function(moduleName, data) {
bootstrappedData[moduleName] = data;
};
+
+ this.registerPlugin = function(plugin) {
+ plugins.push(plugin);
+ };
this.start = function(_options) {
options = _.extend({
this.start = function(_options) {
options = _.extend({