1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-29 12:05:47 +01:00

Replace expression closures (getters).

Expression closures are to be axed. See https://bugzil.la/1083458.
This commit is contained in:
Doug Kearns
2015-05-27 04:42:30 +10:00
parent ce82387cdd
commit 6e8040286a
48 changed files with 808 additions and 532 deletions

View File

@@ -63,9 +63,15 @@ Highlight.defaultValue("extends", function () this.defaultExtends);
Highlight.defaultValue("value", function () this.defaultValue);
update(Highlight.prototype, {
get base() this.baseClass != this.class && highlight.highlight[this.baseClass] || null,
get base() {
return this.baseClass != this.class &&
highlight.highlight[this.baseClass] ||
null;
},
get bases() Ary.compact(this.extends.map(name => highlight.get(name))),
get bases() {
return Ary.compact(this.extends.map(name => highlight.get(name)));
},
get inheritedCSS() {
if (this.gettingCSS)
@@ -79,9 +85,9 @@ update(Highlight.prototype, {
}
},
get css() this.selector + "{" + this.cssText + "}",
get css() { return this.selector + "{" + this.cssText + "}"; },
get cssText() this.inheritedCSS + this.value,
get cssText() { return this.inheritedCSS + this.value; },
toString: function () "Highlight(" + this.class + ")\n\t" +
[k + ": " + JSON.stringify(String(v))