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:
@@ -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");
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user