diff --git a/common/content/buffer.js b/common/content/buffer.js index eb4c7d99..61350a37 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -1158,7 +1158,8 @@ const Buffer = Module("buffer", { elem = find(doc.body || doc.getElementsByTagName("body")[0] || doc.documentElement); } - return elem; + let doc = buffer.focusedFrame.document; + return elem || doc.body || doc.documentElement; }, scrollVertical: function scrollVertical(elem, increment, number) { diff --git a/common/content/dactyl.js b/common/content/dactyl.js index 15d511ac..01a9ae4d 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -1759,7 +1759,7 @@ const Dactyl = Module("dactyl", { commands.add(["q[uit]"], dactyl.has("tabs") ? "Quit current tab" : "Quit application", function (args) { - if (dactyl.has("tabs") && tabs.remove(config.browser.mCurrentTab, 1, false)) + if (dactyl.has("tabs") && tabs.remove(tabs.getTab(), 1, false)) return; else if (dactyl.windows.length > 1) window.close(); @@ -1889,6 +1889,7 @@ const Dactyl = Module("dactyl", { return completion.javascript(context); }, count: true, + hereDoc: true, literal: 0, subCommand: 0 }); diff --git a/common/content/javascript.js b/common/content/javascript.js index 9e042607..50e05fd4 100644 --- a/common/content/javascript.js +++ b/common/content/javascript.js @@ -668,7 +668,10 @@ const JavaScript = Module("javascript", { "boolean", false, { setter: function (value) { if (services.debugger.isOn != value) - services.debugger[value ? "on" : "off"](); + if (value) + (services.debugger.asyncOn || services.debugger.on)(null); + else + services.debugger.off(); }, getter: function () services.debugger.isOn }); diff --git a/common/modules/template.jsm b/common/modules/template.jsm index 581c551d..3defab82 100644 --- a/common/modules/template.jsm +++ b/common/modules/template.jsm @@ -11,10 +11,6 @@ defineModule("template", { }); default xml namespace = XHTML; -function fixXML() { - XML.ignoreWhiteSpace = false; - XML.prettyPrinting = false; -} const Template = Module("Template", { add: function add(a, b) a + b, @@ -39,18 +35,6 @@ const Template = Module("Template", { return ret; }, - maybeXML: function maybeXML(xml) { - if (typeof xml == "xml") - return xml; - try { - XML.ignoreWhitespace = false; - XML.prettyPrinting = false; - return new XMLList(xml); - } - catch (e) {} - return <>{xml}; - }, - bookmarkDescription: function (item, text) <> { @@ -282,7 +266,7 @@ const Template = Module("Template", { this.map(data, function (datum) {datum[0]} - {template.maybeXML(datum[1])} + {datum[1]} ) } ;