Allow modules to be fetched remotely.
parent
b5ddba8741
commit
64ae1c433f
|
@ -218,9 +218,11 @@ function Ace2Editor()
|
|||
}
|
||||
function pushRequireScriptTo(buffer) {
|
||||
var KERNEL_SOURCE = '../static/js/require-kernel.js';
|
||||
var KERNEL_BOOT = 'require.setRootURI("../minified/");\nrequire.setGlobalKeyPath("require");'
|
||||
if (Ace2Editor.EMBEDED && Ace2Editor.EMBEDED[KERNEL_SOURCE]) {
|
||||
buffer.push('<script type="text/javascript">');
|
||||
buffer.push(Ace2Editor.EMBEDED[KERNEL_SOURCE]);
|
||||
buffer.push(KERNEL_BOOT);
|
||||
buffer.push('<\/script>');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -295,6 +295,8 @@
|
|||
<script type="text/javascript">
|
||||
var clientVars = {};
|
||||
(function () {
|
||||
require.setRootURI("../minified/");
|
||||
require.setGlobalKeyPath("require");
|
||||
require('/pad').init();
|
||||
|
||||
/* TODO: These globals shouldn't exist. */
|
||||
|
|
|
@ -204,7 +204,9 @@
|
|||
<script type="text/javascript" >
|
||||
var clientVars = {};
|
||||
(function () {
|
||||
var TimeSlider = require('/timeslider').init();
|
||||
require.setRootURI("../minified/");
|
||||
require.setGlobalKeyPath("require");
|
||||
require('/timeslider').init();
|
||||
|
||||
/* TODO: These globals shouldn't exist. */
|
||||
padeditbar = require('/pad_editbar').padeditbar;
|
||||
|
|
Loading…
Reference in New Issue