Merge branch 'master' of github.com:ajaxorg/ace

This commit is contained in:
Garen Torikian 2012-10-16 13:17:27 -07:00
commit edb4260149
32 changed files with 122 additions and 90 deletions

2
build

@ -1 +1 @@
Subproject commit c2f3abb2ecd3287f90225d804132f0fd26cfb639 Subproject commit 6149ca6b148e878d4c1341d4675ca3597d78dbdd

View file

@ -242,6 +242,8 @@
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
cursor: default; cursor: default;
white-space: pre-line;
word-wrap: break-word;
} }
.ace_folding-enabled > .ace_gutter-cell { .ace_folding-enabled > .ace_gutter-cell {

View file

@ -683,6 +683,7 @@ function Folding() {
}; };
this.onFoldWidgetClick = function(row, e) { this.onFoldWidgetClick = function(row, e) {
e = e.domEvent;
var type = this.getFoldWidget(row); var type = this.getFoldWidget(row);
var line = this.getLine(row); var line = this.getLine(row);
var onlySubfolds = e.shiftKey; var onlySubfolds = e.shiftKey;

View file

@ -304,76 +304,76 @@ var inputBuffer = exports.inputBuffer = {
lastInsertCommands: [], lastInsertCommands: [],
push: function(editor, char, keyId) { push: function(editor, ch, keyId) {
this.idle = false; this.idle = false;
var wObj = this.waitingForParam; var wObj = this.waitingForParam;
if (wObj) { if (wObj) {
this.exec(editor, wObj, char); this.exec(editor, wObj, ch);
} }
// If input is a number (that doesn't start with 0) // If input is a number (that doesn't start with 0)
else if (!(char === "0" && !this.currentCount.length) && else if (!(ch === "0" && !this.currentCount.length) &&
(char.match(/^\d+$/) && this.isAccepting(NUMBER))) { (ch.match(/^\d+$/) && this.isAccepting(NUMBER))) {
// Assuming that char is always of type String, and not Number // Assuming that ch is always of type String, and not Number
this.currentCount += char; this.currentCount += ch;
this.currentCmd = NUMBER; this.currentCmd = NUMBER;
this.accepting = [NUMBER, OPERATOR, MOTION, ACTION]; this.accepting = [NUMBER, OPERATOR, MOTION, ACTION];
} }
else if (!this.operator && this.isAccepting(OPERATOR) && operators[char]) { else if (!this.operator && this.isAccepting(OPERATOR) && operators[ch]) {
this.operator = { this.operator = {
char: char, ch: ch,
count: this.getCount() count: this.getCount()
}; };
this.currentCmd = OPERATOR; this.currentCmd = OPERATOR;
this.accepting = [NUMBER, MOTION, ACTION]; this.accepting = [NUMBER, MOTION, ACTION];
this.exec(editor, { operator: this.operator }); this.exec(editor, { operator: this.operator });
} }
else if (motions[char] && this.isAccepting(MOTION)) { else if (motions[ch] && this.isAccepting(MOTION)) {
this.currentCmd = MOTION; this.currentCmd = MOTION;
var ctx = { var ctx = {
operator: this.operator, operator: this.operator,
motion: { motion: {
char: char, ch: ch,
count: this.getCount() count: this.getCount()
} }
}; };
if (motions[char].param) if (motions[ch].param)
this.waitForParam(ctx); this.waitForParam(ctx);
else else
this.exec(editor, ctx); this.exec(editor, ctx);
} }
else if (alias[char] && this.isAccepting(MOTION)) { else if (alias[ch] && this.isAccepting(MOTION)) {
alias[char].operator.count = this.getCount(); alias[ch].operator.count = this.getCount();
this.exec(editor, alias[char]); this.exec(editor, alias[ch]);
} }
else if (actions[char] && this.isAccepting(ACTION)) { else if (actions[ch] && this.isAccepting(ACTION)) {
var actionObj = { var actionObj = {
action: { action: {
fn: actions[char].fn, fn: actions[ch].fn,
count: this.getCount() count: this.getCount()
} }
}; };
if (actions[char].param) { if (actions[ch].param) {
this.waitForParam(actionObj); this.waitForParam(actionObj);
} }
else { else {
this.exec(editor, actionObj); this.exec(editor, actionObj);
} }
if (actions[char].acceptsMotion) if (actions[ch].acceptsMotion)
this.idle = false; this.idle = false;
} }
else if (this.operator) { else if (this.operator) {
this.exec(editor, { operator: this.operator }, char); this.exec(editor, { operator: this.operator }, ch);
} }
else { else {
this.reset(); this.reset();
} }
if (this.waitingForParam || this.motion || this.operator) { if (this.waitingForParam || this.motion || this.operator) {
this.status += char; this.status += ch;
} else if (this.currentCount) { } else if (this.currentCount) {
this.status = this.currentCount; this.status = this.currentCount;
} else if (this.status) { } else if (this.status) {
@ -410,18 +410,18 @@ var inputBuffer = exports.inputBuffer = {
} }
if (o && !editor.selection.isEmpty()) { if (o && !editor.selection.isEmpty()) {
if (operators[o.char].selFn) { if (operators[o.ch].selFn) {
operators[o.char].selFn(editor, editor.getSelectionRange(), o.count, param); operators[o.ch].selFn(editor, editor.getSelectionRange(), o.count, param);
this.reset(); this.reset();
} }
return; return;
} }
// There is an operator, but no motion or action. We try to pass the // There is an operator, but no motion or action. We try to pass the
// current char to the operator to see if it responds to it (an example // current ch to the operator to see if it responds to it (an example
// of this is the 'dd' operator). // of this is the 'dd' operator).
else if (!m && !a && o && param) { else if (!m && !a && o && param) {
operators[o.char].fn(editor, null, o.count, param); operators[o.ch].fn(editor, null, o.count, param);
this.reset(); this.reset();
} }
else if (m) { else if (m) {
@ -434,7 +434,7 @@ var inputBuffer = exports.inputBuffer = {
} }
}; };
var motionObj = motions[m.char]; var motionObj = motions[m.ch];
var selectable = motionObj.sel; var selectable = motionObj.sel;
if (!o) { if (!o) {
@ -446,7 +446,7 @@ var inputBuffer = exports.inputBuffer = {
else if (selectable) { else if (selectable) {
repeat(function() { repeat(function() {
run(motionObj.sel); run(motionObj.sel);
operators[o.char].fn(editor, editor.getSelectionRange(), o.count, param); operators[o.ch].fn(editor, editor.getSelectionRange(), o.count, param);
}, o.count || 1); }, o.count || 1);
} }
this.reset(); this.reset();

View file

@ -34,57 +34,57 @@ define(function(require, exports, module) {
module.exports = { module.exports = {
"x": { "x": {
operator: { operator: {
char: "d", ch: "d",
count: 1 count: 1
}, },
motion: { motion: {
char: "l", ch: "l",
count: 1 count: 1
} }
}, },
"X": { "X": {
operator: { operator: {
char: "d", ch: "d",
count: 1 count: 1
}, },
motion: { motion: {
char: "h", ch: "h",
count: 1 count: 1
} }
}, },
"D": { "D": {
operator: { operator: {
char: "d", ch: "d",
count: 1 count: 1
}, },
motion: { motion: {
char: "$", ch: "$",
count: 1 count: 1
} }
}, },
"C": { "C": {
operator: { operator: {
char: "c", ch: "c",
count: 1 count: 1
}, },
motion: { motion: {
char: "$", ch: "$",
count: 1 count: 1
} }
}, },
"s": { "s": {
operator: { operator: {
char: "c", ch: "c",
count: 1 count: 1
}, },
motion: { motion: {
char: "l", ch: "l",
count: 1 count: 1
} }
}, },
"S": { "S": {
operator: { operator: {
char: "c", ch: "c",
count: 1 count: 1
}, },
param: "c" param: "c"

View file

@ -580,7 +580,7 @@ module.exports = {
sel: function(editor, range, count, param) { sel: function(editor, range, count, param) {
keepScrollPosition(editor, editor.selectPageUp); keepScrollPosition(editor, editor.selectPageUp);
} }
}, }
}; };
module.exports.backspace = module.exports.left = module.exports.h; module.exports.backspace = module.exports.left = module.exports.h;

View file

@ -99,24 +99,24 @@ module.exports = {
this.onVisualLineMode = false; this.onVisualLineMode = false;
} }
}, },
getRightNthChar: function(editor, cursor, char, n) { getRightNthChar: function(editor, cursor, ch, n) {
var line = editor.getSession().getLine(cursor.row); var line = editor.getSession().getLine(cursor.row);
var matches = line.substr(cursor.column + 1).split(char); var matches = line.substr(cursor.column + 1).split(ch);
return n < matches.length ? matches.slice(0, n).join(char).length : null; return n < matches.length ? matches.slice(0, n).join(ch).length : null;
}, },
getLeftNthChar: function(editor, cursor, char, n) { getLeftNthChar: function(editor, cursor, ch, n) {
var line = editor.getSession().getLine(cursor.row); var line = editor.getSession().getLine(cursor.row);
var matches = line.substr(0, cursor.column).split(char); var matches = line.substr(0, cursor.column).split(ch);
return n < matches.length ? matches.slice(-1 * n).join(char).length : null; return n < matches.length ? matches.slice(-1 * n).join(ch).length : null;
}, },
toRealChar: function(char) { toRealChar: function(ch) {
if (char.length === 1) if (ch.length === 1)
return char; return ch;
if (/^shift-./.test(char)) if (/^shift-./.test(ch))
return char[char.length - 1].toUpperCase(); return ch[ch.length - 1].toUpperCase();
else else
return ""; return "";
}, },

View file

@ -33,6 +33,7 @@ define(function(require, exports, module) {
var dom = require("../lib/dom"); var dom = require("../lib/dom");
var oop = require("../lib/oop"); var oop = require("../lib/oop");
var lang = require("../lib/lang");
var EventEmitter = require("../lib/event_emitter").EventEmitter; var EventEmitter = require("../lib/event_emitter").EventEmitter;
var Gutter = function(parentEl) { var Gutter = function(parentEl) {
@ -78,12 +79,15 @@ var Gutter = function(parentEl) {
var annotation = annotations[i]; var annotation = annotations[i];
var row = annotation.row; var row = annotation.row;
var rowInfo = this.$annotations[row]; var rowInfo = this.$annotations[row];
if (!rowInfo) { if (!rowInfo)
rowInfo = this.$annotations[row] = {text: []}; rowInfo = this.$annotations[row] = {text: []};
}
var annoText = annotation.text.replace(/"/g, "&quot;").replace(/'/g, "&#8217;").replace(/</g, "&lt;"); var annoText = annotation.text;
annoText = annoText ? lang.escapeHTML(annoText) : annotation.html || "";
if (rowInfo.text.indexOf(annoText) === -1) if (rowInfo.text.indexOf(annoText) === -1)
rowInfo.text.push(annoText); rowInfo.text.push(annoText);
var type = annotation.type; var type = annotation.type;
if (type == "error") if (type == "error")
rowInfo.className = " ace_error"; rowInfo.className = " ace_error";

View file

@ -117,6 +117,10 @@ exports.escapeRegExp = function(str) {
return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1'); return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
}; };
exports.escapeHTML = function(str) {
return str.replace(/&/g, "&#38;").replace(/"/g, "&#34;").replace(/'/g, "&#39;").replace(/</g, "&#60;");
};
exports.getMatchOffsets = function(string, regExp) { exports.getMatchOffsets = function(string, regExp) {
var matches = []; var matches = [];

View file

@ -58,11 +58,11 @@ var ColdfusionHighlightRules = function() {
next : "comment" next : "comment"
}, { }, {
token : "meta.tag", token : "meta.tag",
regex : "<(?=\s*script)", regex : "<(?=script)",
next : "script" next : "script"
}, { }, {
token : "meta.tag", token : "meta.tag",
regex : "<(?=\s*style)", regex : "<(?=style)",
next : "style" next : "style"
}, { }, {
token : "meta.tag", // opening tag token : "meta.tag", // opening tag

View file

@ -74,14 +74,14 @@ var DiffHighlightRules = function() {
"support.constant", "support.constant",
"text", "text",
"invalid" "invalid"
], ]
}, { // removed }, { // removed
"regex": "^([<\\-])(.*?)(\\s*)$", "regex": "^([<\\-])(.*?)(\\s*)$",
"token": [ "token": [
"support.function", "support.function",
"string", "string",
"invalid" "invalid"
], ]
}, { }, {
"regex": "^(diff)(\\s+--\\w+)?(.+?)( .+)?$", "regex": "^(diff)(\\s+--\\w+)?(.+?)( .+)?$",
"token": ["variable", "variable", "keyword", "variable"] "token": ["variable", "variable", "keyword", "variable"]

View file

@ -47,7 +47,7 @@ module.exports = {
']', ']',
'[ ', '[ ',
'{ ', '{ ',
'[ #-', '[ #-'
]); ]);
var mode = new PythonMode(); var mode = new PythonMode();

View file

@ -80,11 +80,11 @@ var HtmlHighlightRules = function() {
regex : "<\\!.*?>" regex : "<\\!.*?>"
}, { }, {
token : "meta.tag", token : "meta.tag",
regex : "<(?=\s*script\\b)", regex : "<(?=script\\b)",
next : "script" next : "script"
}, { }, {
token : "meta.tag", token : "meta.tag",
regex : "<(?=\s*style\\b)", regex : "<(?=style\\b)",
next : "style" next : "style"
}, { }, {
token : "meta.tag", // opening tag token : "meta.tag", // opening tag

View file

@ -82,7 +82,7 @@ var JadeHighlightRules = function() {
}, },
{ {
"token" : "punctuation.section.comment", "token" : "punctuation.section.comment",
"regex" : "^\\s*\/\/(?:\\s*[^-\\s]|\\s+\\S)(?:.*$)", "regex" : "^\\s*\/\/(?:\\s*[^-\\s]|\\s+\\S)(?:.*$)"
}, },
{ {
"token" : function(space, text) { "token" : function(space, text) {

View file

@ -55,8 +55,7 @@ var JavaHighlightRules = function() {
"variable.language": "this", "variable.language": "this",
"keyword": keywords, "keyword": keywords,
"constant.language": buildinConstants, "constant.language": buildinConstants,
"support.function": langClasses, "support.function": langClasses
}, "identifier"); }, "identifier");
// regexp must not have capturing parentheses. Use (?:) instead. // regexp must not have capturing parentheses. Use (?:) instead.

View file

@ -52,7 +52,7 @@ var JavaScriptHighlightRules = function() {
"invalid.deprecated": "invalid.deprecated":
"__parent__|__count__|escape|unescape|with|__proto__", "__parent__|__count__|escape|unescape|with|__proto__",
"keyword": "keyword":
"const|yield|import|get|set" + "const|yield|import|get|set|" +
"break|case|catch|continue|default|delete|do|else|finally|for|function|" + "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
"if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger", "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger",
"storage.type": "storage.type":
@ -286,7 +286,7 @@ var JavaScriptHighlightRules = function() {
merge: true merge: true
}, { }, {
token: "constant.language.escape", token: "constant.language.escape",
regex: "-", regex: "-"
}, { }, {
token: "string.regexp.charachterclass", token: "string.regexp.charachterclass",
regex: /[^\]\-\\]+/, regex: /[^\]\-\\]+/,

View file

@ -143,6 +143,8 @@ oop.inherits(JavaScriptWorker, Mirror);
if (maxErrorLevel == "error" && str && /[\w\d{(['"]/.test(str)) { if (maxErrorLevel == "error" && str && /[\w\d{(['"]/.test(str)) {
error.reason = 'Missing ";" before statement'; error.reason = 'Missing ";" before statement';
type = "error"; type = "error";
} else {
type = "info";
} }
} }
else if (disabledWarningsRe.test(raw)) { else if (disabledWarningsRe.test(raw)) {

View file

@ -9,7 +9,7 @@ var LatexHighlightRules = function() {
"start" : [{ "start" : [{
// A tex command e.g. \foo // A tex command e.g. \foo
token : "keyword", token : "keyword",
regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)", regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"
}, { }, {
// Curly and square braces // Curly and square braces
token : "lparen", token : "lparen",

View file

@ -51,7 +51,7 @@ oop.inherits(Mode, TextMode);
"elseif": 1, "elseif": 1,
"repeat": 1, "repeat": 1,
"end": -1, "end": -1,
"until": -1, "until": -1
}; };
var outdentKeywords = [ var outdentKeywords = [
"else", "else",

View file

@ -404,7 +404,7 @@ var PgsqlHighlightRules = function() {
var keywordMapper = this.createKeywordMapper({ var keywordMapper = this.createKeywordMapper({
"support.function": builtinFunctions, "support.function": builtinFunctions,
"keyword": keywords, "keyword": keywords
}, "identifier", true); }, "identifier", true);

View file

@ -39,6 +39,7 @@ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutd
var Range = require("../range").Range; var Range = require("../range").Range;
var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
var CStyleFoldMode = require("./folding/cstyle").FoldMode; var CStyleFoldMode = require("./folding/cstyle").FoldMode;
var unicode = require("../unicode");
var Mode = function() { var Mode = function() {
this.$tokenizer = new Tokenizer(new PhpHighlightRules().getRules()); this.$tokenizer = new Tokenizer(new PhpHighlightRules().getRules());
@ -50,6 +51,20 @@ oop.inherits(Mode, TextMode);
(function() { (function() {
this.tokenRe = new RegExp("^["
+ unicode.packages.L
+ unicode.packages.Mn + unicode.packages.Mc
+ unicode.packages.Nd
+ unicode.packages.Pc + "\_]+", "g"
);
this.nonTokenRe = new RegExp("^(?:[^"
+ unicode.packages.L
+ unicode.packages.Mn + unicode.packages.Mc
+ unicode.packages.Nd
+ unicode.packages.Pc + "\_]|\s])+", "g"
);
this.toggleCommentLines = function(state, doc, startRow, endRow) { this.toggleCommentLines = function(state, doc, startRow, endRow) {
var outdent = true; var outdent = true;
var re = /^(\s*)#/; var re = /^(\s*)#/;

View file

@ -122,11 +122,11 @@ var RubyHighlightRules = function() {
token : "text", // namespaces aren't symbols token : "text", // namespaces aren't symbols
regex : "::" regex : "::"
}, { }, {
token : "variable.instancce", // instance variable token : "variable.instance", // instance variable
regex : "@{1,2}(?:[a-zA-Z_]|\d)+" regex : "@{1,2}[a-zA-Z_\\d]+"
}, { }, {
token : "variable.class", // class name token : "variable.class", // class name
regex : "[A-Z](?:[a-zA-Z_]|\d)+" regex : "[A-Z][a-zA-Z_\\d]+"
}, { }, {
token : "string", // symbol token : "string", // symbol
regex : "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?" regex : "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"

View file

@ -40,7 +40,7 @@ var scadHighlightRules = function() {
var keywordMapper = this.createKeywordMapper({ var keywordMapper = this.createKeywordMapper({
"variable.language": "this", "variable.language": "this",
"keyword": "module|if|else|for", "keyword": "module|if|else|for",
"constant.language": "NULL", "constant.language": "NULL"
}, "identifier"); }, "identifier");
// regexp must not have capturing parentheses. Use (?:) instead. // regexp must not have capturing parentheses. Use (?:) instead.

View file

@ -126,7 +126,7 @@ var ScalaHighlightRules = function() {
"string" : [ "string" : [
{ {
token : "escape", token : "escape",
regex : '\\\\"', regex : '\\\\"'
}, { }, {
token : "string", token : "string",
merge : true, merge : true,

View file

@ -92,7 +92,7 @@ var ShHighlightRules = function() {
regex : variable regex : variable
}, { }, {
token : "support.function", token : "support.function",
regex : func, regex : func
}, { }, {
token : "support.function", token : "support.function",
regex : fileDescriptor regex : fileDescriptor

View file

@ -41,7 +41,7 @@ var SvgHighlightRules = function() {
this.$rules.start.splice(3, 0, { this.$rules.start.splice(3, 0, {
token : "meta.tag", token : "meta.tag",
regex : "<(?=\s*script)", regex : "<(?=script)",
next : "script" next : "script"
}); });

View file

@ -150,16 +150,16 @@ var TclHighlightRules = function() {
}], }],
"variable" : [ "variable" : [
{ {
token : "variable.instancce", // variable xotcl with braces token : "variable.instance", // variable xotcl with braces
regex : "(?:[:][:])?(?:[a-zA-Z_]|\d)+(?:(?:[:][:])?(?:[a-zA-Z_]|\d)+)?(?:[(](?:[a-zA-Z_]|\d)+[)])?", regex : "(?:[:][:])?[a-zA-Z_\\d]+(?:(?:[:][:])?[a-zA-Z_\\d]+)?(?:[(][a-zA-Z_\\d]+[)])?",
next : "start" next : "start"
}, { }, {
token : "variable.instancce", // variable tcl token : "variable.instance", // variable tcl
regex : "(?:[a-zA-Z_]|\d)+(?:[(](?:[a-zA-Z_]|\d)+[)])?", regex : "[a-zA-Z_\\d]+(?:[(][a-zA-Z_\\d]+[)])?",
next : "start" next : "start"
}, { }, {
token : "variable.instancce", // variable tcl with braces token : "variable.instance", // variable tcl with braces
regex : "{?(?:[a-zA-Z_]|\d)+}?", regex : "{?[a-zA-Z_\\d]+}?",
next : "start" next : "start"
}], }],
"qqstring" : [ { "qqstring" : [ {

View file

@ -43,7 +43,7 @@ module.exports = {
"test: configure the search object" : function() { "test: configure the search object" : function() {
var search = new Search(); var search = new Search();
search.set({ search.set({
needle: "juhu", needle: "juhu"
}); });
}, },
@ -397,7 +397,7 @@ module.exports = {
var search = new Search().set({ var search = new Search().set({
needle: "[ ]+$", needle: "[ ]+$",
regExp: true, regExp: true,
wrap: true, wrap: true
}); });
session.getSelection().moveCursorTo(1, 2); session.getSelection().moveCursorTo(1, 2);
@ -414,7 +414,7 @@ module.exports = {
var search = new Search().set({ var search = new Search().set({
needle: "foo", needle: "foo",
wrap: true, wrap: true,
wholeWord: true, wholeWord: true
}); });
session.getSelection().moveCursorTo(0, 4); session.getSelection().moveCursorTo(0, 4);
@ -437,7 +437,7 @@ module.exports = {
needle: "foo", needle: "foo",
wrap: true, wrap: true,
wholeWord: true, wholeWord: true,
backwards: true, backwards: true
}); });
session.getSelection().moveCursorTo(0, 13); session.getSelection().moveCursorTo(0, 13);

View file

@ -202,7 +202,7 @@ module.exports = {
assert.equal(iterator.getCurrentToken().value, "for"); assert.equal(iterator.getCurrentToken().value, "for");
assert.equal(iterator.getCurrentTokenRow(), 1); assert.equal(iterator.getCurrentTokenRow(), 1);
assert.equal(iterator.getCurrentTokenColumn(), 4); assert.equal(iterator.getCurrentTokenColumn(), 4);
}, }
}; };
}); });

View file

@ -103,7 +103,7 @@ var Tokenizer = function(rules, flag) {
var token = { var token = {
type: null, type: null,
value: "", value: "",
state: currentState, state: currentState
}; };
initState(); initState();

View file

@ -1,8 +1,13 @@
"no use strict"; "no use strict";
var console = { var console = {
log: function(msgs) { log: function() {
postMessage({type: "log", data: arguments.join(" ")}); var msgs = Array.prototype.slice.call(arguments, 0);
postMessage({type: "log", data: msgs});
},
error: function() {
var msgs = Array.prototype.slice.call(arguments, 0);
postMessage({type: "log", data: msgs});
} }
}; };
var window = { var window = {

View file

@ -84,7 +84,7 @@ var WorkerClient = function(topLevelNamespaces, mod, classname) {
var msg = e.data; var msg = e.data;
switch(msg.type) { switch(msg.type) {
case "log": case "log":
window.console && console.log && console.log(msg.data); window.console && console.log && console.log.apply(console, msg.data);
break; break;
case "event": case "event":