1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-19 11:25:46 +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

@@ -131,6 +131,16 @@ var Template = Module("Template", {
update: function update() {
this.collapsed = !this.commandAllowed;
}
}),
Events: Class("Events", Binding, {
init: function init(node, params) {
init.supercall(this, node);
let obj = params.eventTarget;
for (let [event, handler] in Iterator(obj[this.getAttribute("events") || "events"]))
node.addEventListener(event, obj.closure(handler), false);
}
})
},