IE fix
This commit is contained in:
parent
b200db90e8
commit
07a51beb2b
1 changed files with 9 additions and 10 deletions
|
|
@ -38,13 +38,13 @@
|
||||||
// don't define it in a worker.
|
// don't define it in a worker.
|
||||||
if (window.document) {
|
if (window.document) {
|
||||||
|
|
||||||
var deps = [ "pilot/fixoldbrowsers", "pilot/plugin_manager", "pilot/settings",
|
require("pilot/fixoldbrowsers");
|
||||||
"pilot/environment" ];
|
require("pilot/settings");
|
||||||
|
|
||||||
require(deps, function() {
|
var catalog = require("pilot/plugin_manager").catalog;
|
||||||
var catalog = require("pilot/plugin_manager").catalog;
|
var Event = require("pilot/event");
|
||||||
catalog.registerPlugins([ "pilot/index" ]);
|
|
||||||
});
|
catalog.registerPlugins([ "pilot/index" ]);
|
||||||
|
|
||||||
var ace = {
|
var ace = {
|
||||||
edit: function(el) {
|
edit: function(el) {
|
||||||
|
|
@ -52,7 +52,6 @@ if (window.document) {
|
||||||
el = document.getElementById(el);
|
el = document.getElementById(el);
|
||||||
}
|
}
|
||||||
var env = require("pilot/environment").create();
|
var env = require("pilot/environment").create();
|
||||||
var catalog = require("pilot/plugin_manager").catalog;
|
|
||||||
catalog.startupPlugins({ env: env }).then(function() {
|
catalog.startupPlugins({ env: env }).then(function() {
|
||||||
var EditSession = require("ace/edit_session").EditSession;
|
var EditSession = require("ace/edit_session").EditSession;
|
||||||
var JavaScriptMode = require("ace/mode/javascript").Mode;
|
var JavaScriptMode = require("ace/mode/javascript").Mode;
|
||||||
|
|
@ -69,11 +68,11 @@ if (window.document) {
|
||||||
env.editor = new Editor(new Renderer(el, theme));
|
env.editor = new Editor(new Renderer(el, theme));
|
||||||
env.editor.setSession(doc);
|
env.editor.setSession(doc);
|
||||||
env.editor.resize();
|
env.editor.resize();
|
||||||
window.addEventListener("resize", function() {
|
Event.addListener(window, "resize", function() {
|
||||||
env.editor.resize();
|
env.editor.resize();
|
||||||
}, false);
|
});
|
||||||
el.env = env;
|
el.env = env;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue