1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-04 17:15:46 +01:00

Avoid using delete operator.

This commit is contained in:
Kris Maglione
2014-02-23 12:36:13 -08:00
parent c37656f731
commit d1fd687eb4
3 changed files with 19 additions and 14 deletions

View File

@@ -134,8 +134,12 @@ var Highlights = Module("Highlight", {
obj.style.enabled = true;
else
this.loaded.__defineSetter__(obj.class, function () {
delete this[obj.class];
this[obj.class] = true;
Object.defineProperty(this, obj.class, {
value: true,
configurable: true,
enumerable: true,
writable: true
});
if (obj.class === obj.baseClass)
for (let h in highlight)