1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-23 06:45: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

@@ -188,10 +188,17 @@ var Highlights = Module("Highlight", {
* @param {Node} node
* @param {string} group
*/
highlightNode: function (node, group) {
highlightNode: function (node, group, applyBindings) {
node.setAttributeNS(NS.uri, "highlight", group);
for each (let h in group.split(" "))
this.loaded[h] = true;
let groups = group.split(" ");
for each (let group in groups)
this.loaded[group] = true;
if (applyBindings)
for each (let group in groups)
if (group in template.bindings)
template.bindings[group](node, applyBindings);
},
/**