1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-02 06:55:46 +01:00

Replace expression closures (function declarations).

Expression closures are to be axed. See https://bugzil.la/1083458.
This commit is contained in:
Doug Kearns
2015-05-25 23:59:30 +10:00
parent 5ab1befbf7
commit c0b7c4c35d
31 changed files with 292 additions and 162 deletions

View File

@@ -861,7 +861,10 @@ var Events = Module("events", {
// access to the real focus target
// Huh? --djk
onFocusChange: util.wrapCallback(function onFocusChange(event) {
function hasHTMLDocument(win) win && win.document && win.document instanceof Ci.nsIDOMHTMLDocument
function hasHTMLDocument(win) {
return win && win.document && win.document instanceof Ci.nsIDOMHTMLDocument;
}
if (dactyl.ignoreFocus)
return;
@@ -1129,10 +1132,12 @@ var Events = Module("events", {
init: function init(values, map) {
this.name = "passkeys:" + map;
this.stack = MapHive.Stack(values.map(v => Map(v[map + "Keys"])));
function Map(keys) ({
execute: function () Events.PASS_THROUGH,
keys: keys
});
function Map(keys) {
return {
execute: function () Events.PASS_THROUGH,
keys: keys
};
}
},
get active() this.stack.length,