1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 10:18:00 +01:00

Replace expression closures (function expressions - named and dynamic this).

Expression closures are to be axed. See https://bugzil.la/1083458.

Leaving deprecated() and literal() calls and method shorthand syntax
conversions until after the ESR overlap.
This commit is contained in:
Doug Kearns
2015-06-06 23:12:40 +10:00
parent 07b64b3197
commit b236add69d
43 changed files with 876 additions and 520 deletions

View File

@@ -46,7 +46,9 @@ var ProcessorStack = Class("ProcessorStack", {
this.processors.unshift(KeyProcessor(modes.BASE, hive));
},
passUnknown: Class.Memoize(function () options.get("passunknown").getKey(this.modes)),
passUnknown: Class.Memoize(function () {
return options.get("passunknown").getKey(this.modes);
}),
notify: function () {
events.dbg("NOTIFY()");
@@ -107,7 +109,9 @@ var ProcessorStack = Class("ProcessorStack", {
}
else if (result !== Events.KILL && !this.actions.length &&
!(this.events[0].isReplay || this.passUnknown ||
this.modes.some(function (m) m.passEvent(this), this.events[0]))) {
this.modes.some(function (m) {
return m.passEvent(this);
}, this.events[0]))) {
// No patching processors, this isn't a fake, pass-through
// event, we're not in pass-through mode, and we're not
// choosing to pass unknown keys. Kill the event and beep.