load worker from c9.io to fix loading on ie and firefox

pull/272/head
nightwing 2016-03-16 01:19:48 +04:00
rodzic 24f001d98a
commit 50640cbeef
3 zmienionych plików z 8 dodań i 5 usunięć

Wyświetl plik

@ -200,7 +200,7 @@ window.onmessage = function(e) {
sender._signal(msg.event, msg.data); sender._signal(msg.event, msg.data);
} }
else if (msg.command) { else if (msg.command) {
if (main[msg.command]) if (main && main[msg.command])
main[msg.command].apply(main, msg.args); main[msg.command].apply(main, msg.args);
else if (window[msg.command]) else if (window[msg.command])
window[msg.command].apply(window, msg.args); window[msg.command].apply(window, msg.args);

Wyświetl plik

@ -36,7 +36,7 @@ var net = require("../lib/net");
var EventEmitter = require("../lib/event_emitter").EventEmitter; var EventEmitter = require("../lib/event_emitter").EventEmitter;
var config = require("../config"); var config = require("../config");
var WorkerClient = function(topLevelNamespaces, mod, classname, workerUrl) { var WorkerClient = function(topLevelNamespaces, mod, classname, workerUrl, importScripts) {
this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this); this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this);
this.changeListener = this.changeListener.bind(this); this.changeListener = this.changeListener.bind(this);
this.onMessage = this.onMessage.bind(this); this.onMessage = this.onMessage.bind(this);
@ -75,6 +75,9 @@ var WorkerClient = function(topLevelNamespaces, mod, classname, workerUrl) {
throw e; throw e;
} }
} }
if (importScripts) {
this.send("importScripts", importScripts);
}
this.$worker.postMessage({ this.$worker.postMessage({
init : true, init : true,
tlns : tlns, tlns : tlns,

Wyświetl plik

@ -55,7 +55,7 @@
"c9" "c9"
], ],
"c9plugins": { "c9plugins": {
"c9.ide.language": "#db77f906a2", "c9.ide.language": "#f03e5ca0c8",
"c9.ide.language.css": "#be07d72209", "c9.ide.language.css": "#be07d72209",
"c9.ide.language.generic": "#92210f5a48", "c9.ide.language.generic": "#92210f5a48",
"c9.ide.language.html": "#22fdc74869", "c9.ide.language.html": "#22fdc74869",