1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-04 13:55:46 +01:00

Closes issue #309.

This commit is contained in:
Kris Maglione
2011-02-03 13:25:52 -05:00
parent 0735b2d81c
commit 145fedce44
2 changed files with 4 additions and 3 deletions

View File

@@ -843,13 +843,11 @@ var CommandLine = Module("commandline", {
let output = [];
function observe(str, highlight, dom) {
util.dumpStack();
output.push(dom && !isString(str) ? dom : str);
}
this.savingOutput = true;
dactyl.trapErrors.apply(dactyl, [fn, self].concat(Array.slice(arguments, 2)));
util.dump(output);
this.savingOutput = false;
return output.map(function (elem) elem instanceof Node ? util.domToString(elem) : elem)
.join("\n");

View File

@@ -730,7 +730,10 @@ var RangeFind = Class("RangeFind", {
},
nodeRange: function (node) {
let range = node.ownerDocument.createRange();
range.selectNode(node);
try {
range.selectNode(node);
}
catch (e) {}
return range;
},
sameDocument: function (r1, r2) r1 && r2 && r1.endContainer.ownerDocument == r2.endContainer.ownerDocument,