Use Object.defineProperty not __defineGetter__

This allows this library to be used in IE9/IE10.
This commit is contained in:
omphalos 2015-10-11 21:27:02 -05:00
parent 5670628570
commit 4a0d9cd224
1 changed files with 4 additions and 2 deletions

View File

@ -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 () {