diff --git a/index.html b/index.html index e16b096abb..c5ff002029 100644 --- a/index.html +++ b/index.html @@ -34,7 +34,7 @@ './example/imagery/bundle', './example/eventGenerator/bundle', './example/generator/bundle' - ], mct.run.bind(mct)); + ], mct.start.bind(mct)); }); diff --git a/main.js b/main.js index 579b33dc4f..561c6e8b79 100644 --- a/main.js +++ b/main.js @@ -62,6 +62,7 @@ requirejs.config({ define([ './platform/framework/src/Main', 'legacyRegistry', + './src/MCT', './platform/framework/bundle', './platform/core/bundle', @@ -97,11 +98,14 @@ define([ './platform/search/bundle', './platform/status/bundle', './platform/commonUI/regions/bundle' -], function (Main, legacyRegistry) { - return { - legacyRegistry: legacyRegistry, - run: function () { - return new Main().run(legacyRegistry); - } - }; +], function (Main, legacyRegistry, MCT) { + var mct = new MCT(); + + mct.legacyRegistry = legacyRegistry; + mct.run = mct.start; + mct.on('start', function () { + return new Main().run(legacyRegistry); + }); + + return mct; }); diff --git a/src/MCT.js b/src/MCT.js new file mode 100644 index 0000000000..4999e5e548 --- /dev/null +++ b/src/MCT.js @@ -0,0 +1,13 @@ +define(['EventEmitter'], function (EventEmitter) { + function MCT() { + EventEmitter.call(this); + } + + MCT.prototype = Object.create(EventEmitter.prototype); + + MCT.prototype.start = function () { + this.emit('start'); + }; + + return MCT; +});