Closed beeftornado closed 9 years ago
Someone has suggested that only creating one store solves the issue. Interesting. Just thought I'd point it out. https://bugs.webkit.org/show_bug.cgi?id=136937
Yes, Safari's IndexedDB is broken, and onupgradeneeded
is not only the one issue. I like Pouch's trick, and we need to add here: https://github.com/alekseykulikov/treo/blob/master/plugins/treo-websql/index.js#L1 (pull request is welcome:)
Even manually activating the plugin in safari didn't work. A different exception gets thrown. Was hoping to narrow it down further, but ran out of time today. Will research more this week.
Safari added indexedDB, but it seems broken and since it actually exists, Treo never falls back to websql (if one opted to use the plugin). According to some investigation done by pouchdb guys, Safari may not always fire the
onupgradeneeded
event and thus for new databases, the stores will never be created. This throws an exception. https://github.com/pouchdb/pouchdb/issues/2533Maybe in the websql plugin we can activate it using the hack they chose to do... https://github.com/pouchdb/pouchdb/commit/2a2e722b06d98a8122c751361b7e80b1e066c721
I'm going to try it out locally.