1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-20 06:25:45 +01:00

Get rid of horrible coalesced event handlers in commandline.js.

--HG--
branch : key-processing
This commit is contained in:
Kris Maglione
2011-01-24 12:50:08 -05:00
parent 56777f59c3
commit 9786171520
10 changed files with 181 additions and 206 deletions

View File

@@ -1602,19 +1602,17 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
case "element":
let domnode = doc.createElementNS(node.namespace(), node.localName());
for each (let attr in node.@*::*)
if (attr.name() != "highlight")
domnode.setAttributeNS(attr.namespace(), attr.localName(), String(attr));
for each (let child in node.*::*)
domnode.appendChild(xmlToDom(child, doc, nodes));
if (nodes && node.@key)
nodes[node.@key] = domnode;
for each (let attr in node.@*::*)
if (attr.name() != "highlight")
domnode.setAttributeNS(attr.namespace(), attr.localName(), String(attr));
else {
highlight.highlightNode(domnode, String(attr));
if (attr in template.bindings)
template.bindings[attr](domnode, nodes);
}
if (node.@highlight)
highlight.highlightNode(domnode, String(node.@highlight), nodes || true);
return domnode;
default:
return null;