Merge pull request #5 from omphalos/defineProperty
Use Object.defineProperty not __defineGetter__
This commit is contained in:
commit
a13644945f
|
@ -88,8 +88,10 @@
|
|||
return Object.keys(this)[i];
|
||||
};
|
||||
|
||||
Storage.prototype.__defineGetter__('length', function () {
|
||||
return Object.keys(this).length;
|
||||
Object.defineProperty(Storage.prototype, 'length', {
|
||||
get: function() {
|
||||
return Object.keys(this).length;
|
||||
}
|
||||
});
|
||||
|
||||
Storage.prototype.___save___ = function () {
|
||||
|
|
Loading…
Reference in New Issue