Use Object.defineProperty not __defineGetter__
This allows this library to be used in IE9/IE10.
This commit is contained in:
parent
5670628570
commit
4a0d9cd224
|
@ -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