diff --git a/common/modules/buffer.jsm b/common/modules/buffer.jsm index 7cb78a61..8339bdc6 100644 --- a/common/modules/buffer.jsm +++ b/common/modules/buffer.jsm @@ -1757,8 +1757,10 @@ var Buffer = Module("Buffer", { if (arg) { prefs.set("print.print_printer", PRINTER); + let { path } = io.File(arg.substr(1)); set("print_to_file", true); - set("print_to_filename", io.File(arg.substr(1)).path); + set("print_to_filename", path); + prefs.set("print_to_filename", path); dactyl.echomsg(_("print.toFile", arg.substr(1))); } diff --git a/common/modules/dom.jsm b/common/modules/dom.jsm index 810c86eb..0e1daa26 100644 --- a/common/modules/dom.jsm +++ b/common/modules/dom.jsm @@ -213,7 +213,7 @@ var DOM = Class("DOM", { for (let i = 0; i < this.length; i++) { let tmp = fn.call(self || update(obj, [this[i]]), this[i], i); - if (isObject(tmp) && "length" in tmp) + if (isObject(tmp) && !(tmp instanceof Ci.nsIDOMNode) && "length" in tmp) for (let j = 0; j < tmp.length; j++) res[res.length++] = tmp[j]; else if (tmp != null)