remove listeners when worker is terminated
fixes bug with workers on firefox 8.0a
This commit is contained in:
parent
0b25b7593f
commit
fdb8372597
4 changed files with 28 additions and 32 deletions
|
|
@ -78,17 +78,8 @@ oop.inherits(Mode, TextMode);
|
|||
};
|
||||
|
||||
this.createWorker = function(session) {
|
||||
var doc = session.getDocument();
|
||||
var worker = new WorkerClient(["ace", "pilot"], "worker-css.js", "ace/mode/css_worker", "Worker");
|
||||
worker.call("setValue", [doc.getValue()]);
|
||||
|
||||
doc.on("change", function(e) {
|
||||
e.range = {
|
||||
start: e.data.range.start,
|
||||
end: e.data.range.end
|
||||
};
|
||||
worker.emit("change", e);
|
||||
});
|
||||
worker.attachToDocument(session.getDocument());
|
||||
|
||||
worker.on("csslint", function(e) {
|
||||
var errors = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue