-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support shimIndexedDB
#65
Conversation
Thanks for the PR! Well, that is a delicate issue. IDBWrapper already checks for One could, however, prefer |
I don't fully agree, if the shim is not needed, the shim should not be exposed. (A good shim implementation would anyways always fallback to a native implementation if suitable). The buggy safari implementation is an issue that affects all iPhones and hence this wrapper is useless for cordova based apps. Anyways, up to you. |
In the end, it comes down to being a Safari issue that the Having that in mind, I have to agree to
which in turn means that it should be ok to prefer the shim over a native implementation and move responsibility to the developer/deployer; who knows, this way one might be able to use the shim also to outgo IE's buggy IDB impl. Could you please change your PR to not include the second lookup of Will merge this. |
Sorry, missed that one, done. |
Great, thanks! |
Prefer `shimIndexedDB` over `indexedDB`
@rubenstolk Had to change that again, the shim is no more preferred as of 1.6.1. However, you can set the impl preference now yourself: https://github.com/jensarps/IDBWrapper/wiki/Usage#defining-implementation-preference-aka-make-idbwrapper-use-the-shim I got a mail from a user who was always loading the shim, regardless of what browser was running, and updating to 1.6.0 broke his app on browsers w/o SQLite. Always including the shim is a questionable decision, as is the shim not checking for SQLite existence, but those scenarios seemingly exist and should survive an update of IDBWrapper w/o exploding. So, sorry for the inconvenience, but I think the impl preference is a reasonable and future-proof way to handle this. |
Hi @jensarps I like your solution and will implement this accordingly in my situation. Thanks for informing! |
Important because for example safari doesn't allow overwriting this (see https://github.com/axemclion/IndexedDBShim), useful for cordova apps.