Index: chrome/content/composer.js |
=================================================================== |
--- a/chrome/content/composer.js |
+++ b/chrome/content/composer.js |
@@ -101,11 +101,10 @@ |
}; |
} |
else { |
- obj.__defineGetter__(key, function() { |
- return orig[key]; |
- }); |
- obj.__defineSetter__(key, function(value) { |
- orig[key] = value; |
+ Object.defineProperty(obj, key, { |
+ get: () => orig[key], |
+ set: value => { orig[key] = value; }, |
+ enumerable: true |
}); |
} |
} |
@@ -250,11 +249,11 @@ |
else if (attr.name == "class" && /\S/.test(attr.selected)) |
{ |
let knownClasses = {}; |
- for each (let cls in attr.value.split(/\s+/)) |
+ for (let cls of attr.value.split(/\s+/)) |
knownClasses[cls] = true; |
- let classes = attr.selected.split(/\s+/).filter(function(cls) cls != ""); |
- if (classes.every(function(cls) knownClasses.hasOwnProperty(cls))) |
+ let classes = attr.selected.split(/\s+/).filter(cls => cls != ""); |
+ if (classes.every(cls => knownClasses.hasOwnProperty(cls))) |
expression += "." + classes.map(escapeName).join("."); |
else |
useFallback = true; |