IE9 support #80

DurhamG opened this Issue Feb 23, 2012 · 2 comments


None yet

2 participants


I tweaked persistence.js slightly and it seems to work in IE9 now (using the in-memory store). Just replace your usages of __defineG/Setter__ like so:

myobject.__defineGetter__(field, mycallback);
Object.defineProperty(myobject, field, { get : myGetCallback, set : mySetCallback, enumerable : true, configurable : true });

It appears to work in IE9 and the latest versions of webkit.

The only other change I had to make was in LocalQueryCollection.prototype.add/addAll, I moved this._items.push(obj); to be above this._session.add(obj); instead of below it, because otherwise I was encountering infinite recursion. I don't know why that happened in IE and not Chrome.


Correct. I just call persistence.loadFromLocalStorage and persistence.saveToLocalStorage. To be fair, I haven't tested it extensively, but my data shows up and is persisted, so that's better than before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment