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

Replace expression closures (function expressions).

Expression closures are to be axed. See https://bugzil.la/1083458.
This commit is contained in:
Doug Kearns
2015-05-26 03:38:58 +10:00
parent 34bfc2f50f
commit ce82387cdd
35 changed files with 182 additions and 184 deletions

View File

@@ -88,7 +88,7 @@ var DOM = Class("DOM", {
Empty: function Empty() this.constructor(null, this.document),
nodes: Class.Memoize(function () ({})),
nodes: Class.Memoize(() => ({})),
get items() {
return function* () {
@@ -1567,10 +1567,10 @@ var DOM = Class("DOM", {
if (!isString(name) || args.length == 0 || name === "") {
var frag = doc.createDocumentFragment();
Array.forEach(args, function (arg) {
Array.forEach(args, arg => {
if (!isArray(arg[0]))
arg = [arg];
arg.forEach(function (arg) {
arg.forEach(arg => {
frag.appendChild(tag(arg, namespaces));
});
});
@@ -1710,12 +1710,12 @@ var DOM = Class("DOM", {
if (isFragment(args)) {
let res = [];
let join = isArray(args) && isStrings(args) ? "" : "\n";
Array.forEach(args, function (arg) {
Array.forEach(args, arg => {
if (!isArray(arg[0]))
arg = [arg];
let contents = [];
arg.forEach(function (arg) {
arg.forEach(arg => {
let string = tag(arg, namespaces, indent);
if (string)
contents.push(string);