Convert webpackified factories to es6 modules with global exports, and remove the invoke_page_factory pattern

This commit is contained in:
Calen Pennington
2018-03-22 16:14:51 -04:00
parent 12a082cf83
commit ee6360543b
28 changed files with 219 additions and 303 deletions

View File

@@ -1,27 +0,0 @@
define([], function() {
'use strict';
return function invokePageFactory(name, factory) {
var args;
if (typeof window.pageFactoryArguments === 'undefined') {
throw Error(
'window.pageFactoryArguments must be initialized before calling invokePageFactory(' +
name +
'). Use the <%static:invoke_page_bundle> template tag.'
);
}
args = window.pageFactoryArguments[name];
if (typeof args === 'undefined') {
throw Error(
'window.pageFactoryArguments["' +
name +
'"] must be initialized before calling invokePageFactory(' +
name +
'). Use the <%static:invoke_page_bundle> template tag.'
);
}
factory.apply(null, window.pageFactoryArguments[name]);
};
});

View File

@@ -1,7 +1,7 @@
(function() {
'use strict';
XBlock.Runtime.v1 = (function() {
this.XBlock.Runtime.v1 = (function() {
function v1() {
var _this = this;
this.childMap = function() {