mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-01 05:25:45 +01:00
Get rid of horrible coalesced event handlers in commandline.js.
--HG-- branch : key-processing
This commit is contained in:
@@ -270,9 +270,11 @@ var Overlay = Module("Overlay", {
|
||||
|
||||
modules.events.addSessionListener(window, "unload", function onUnload() {
|
||||
window.removeEventListener("unload", onUnload.wrapped, false);
|
||||
for (let [, mod] in iter(modules))
|
||||
if (mod instanceof ModuleBase && "destroy" in mod)
|
||||
util.trapErrors(mod.destroy, mod);
|
||||
for (let prop in properties(modules)) {
|
||||
let desc = Object.getOwnPropertyDescriptor(modules, prop);
|
||||
if (desc.value instanceof ModuleBase && "destroy" in desc.value)
|
||||
util.trapErrors(desc.value.destroy, desc.value);
|
||||
}
|
||||
}, false);
|
||||
}
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user