1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-04 06:54:11 +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

@@ -260,7 +260,9 @@ var Buffer = Module("Buffer", {
get modules() { return this.topWindow.dactyl.modules; },
set modules(val) {},
topWindow: Class.Memoize(function () util.topWindow(this.win)),
topWindow: Class.Memoize(function () {
return util.topWindow(this.win);
}),
/**
* @property {nsIURI} The current top-level document's URI.
@@ -1042,7 +1044,9 @@ var Buffer = Module("Buffer", {
.sort((a, b) => a[1] - b[1]);
if (offScreen && !reverse)
elems = elems.filter(function (e) e[1] > this, this.topWindow.innerHeight);
elems = elems.filter(function (e) {
return e[1] > this, this.topWindow.innerHeight;
});
let idx = Math.min((count || 1) - 1, elems.length);
util.assert(idx in elems);