1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-01 16:45:59 +01:00

Make Bookmark objects live writeable.

This commit is contained in:
Kris Maglione
2010-12-10 01:38:39 -05:00
parent 38c2d07ef1
commit 36205c6c0e
7 changed files with 57 additions and 26 deletions

View File

@@ -15,7 +15,7 @@ const Highlight = Struct("class", "selector", "sites",
"default", "value", "agent",
"base", "baseClass", "style");
Highlight.liveProperty = function (name, prop) {
let i = this.prototype.members.indexOf(name);
let i = this.prototype.members[name];
this.prototype.__defineGetter__(name, function () this[i]);
this.prototype.__defineSetter__(name, function (val) {
this[i] = val;