1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-17 07:15:46 +01:00

Merge addon-common module loading code to fix Minefield.

--HG--
extra : rebase_source : 6b5f0dc0a575a6d21892e18cbb56ab0230382356
This commit is contained in:
Kris Maglione
2012-05-07 17:01:21 -04:00
parent 461b26c603
commit 43f3295127
33 changed files with 415 additions and 543 deletions

View File

@@ -6,11 +6,12 @@
try {
Components.utils.import("resource://dactyl/bootstrap.jsm");
defineModule("overlay", {
exports: ["overlay"],
require: ["util"]
}, this);
});
lazyRequire("highlight", ["highlight"]);
var getAttr = function getAttr(elem, ns, name)
elem.hasAttributeNS(ns, name) ? elem.getAttributeNS(ns, name) : null;
@@ -224,7 +225,7 @@ var Overlay = Module("Overlay", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReferen
iterator = ([elem.@id, elem.elements(), elem.@*::*.(function::name() != "id")] for each (elem in obj[key]));
for (let [elem, xml, attr] in iterator) {
if (elem = doc.getElementById(elem)) {
if (elem = doc.getElementById(String(elem))) {
let node = DOM.fromXML(xml, doc, obj.objects);
if (!(node instanceof Ci.nsIDOMDocumentFragment))
elems.push(node);