diff --git a/common/content/commandline.js b/common/content/commandline.js index e02bcd5a..958d466f 100644 --- a/common/content/commandline.js +++ b/common/content/commandline.js @@ -959,7 +959,7 @@ var CommandLine = Module("commandline", { this.savingOutput = true; apply(dactyl, "trapErrors", [fn, self].concat(args)); this.savingOutput = false; - return output.map(elem => elem instanceof Node ? DOM.stringify(elem) : elem) + return output.map(elem => elem instanceof Ci.nsIDOMNode ? DOM.stringify(elem) : elem) .join("\n"); } }, { diff --git a/common/content/mow.js b/common/content/mow.js index 4f98ec17..df47087d 100644 --- a/common/content/mow.js +++ b/common/content/mow.js @@ -139,9 +139,11 @@ var MOW = Module("mow", { body.append(output); - let str = typeof data !== "xml" && data.message || data; - if (!silent) - dactyl.triggerObserver("echoMultiline", data, highlightGroup, output[0]); + if (!silent) { + let str = data.message || data; + let msg = isString(str) ? str : output[0]; + dactyl.triggerObserver("echoMultiline", data, highlightGroup, msg); + } this._timer.tell(); if (!this.visible)