-
-
Notifications
You must be signed in to change notification settings - Fork 44
Safari not supported #12
Comments
level.js requires indexeddb: http://caniuse.com/indexeddb ways you can help: test out this http://nparashuram.com/IndexedDBShim/ and or use https://github.com/No9/node-leveldown-gap but be warned that On Mon, Jul 1, 2013 at 3:29 PM, Matteo Collina notifications@git.luolix.topwrote:
|
Thanks for the quick reply! You definitely need a testling badge #2 :). Seems the best way is IndexedDBShim, I'll try to test it! For the moment, I'll dropping the support for Safari on LevelGraph. |
I got safari to pass locally (by using IndexedDBShim) but it fails on testling |
oh wait sorry, I was wrong, safari doesn't pass locally. now I'm using https://github.com/axemclion/IndexedDBShim in the level.js tests, which causes it to pass in Internet Explorer 10, but it seems like Safari's sorting implementation in WebSQL is maybe incorrect? click on safari 6.0 here to see the test output https://ci.testling.com/maxogden/level.js here's a sample of one of the failing tests:
|
@maxogden is it possible this browser is doing automatic numeric conversion? It's expecting strings for both key and value but getting number types for both of them! |
I've been getting by by falling back on LevelDown (localstorage): https://github.com/TehShrike/noddity/blob/6f79c8029f3c386c47f2f12c01cfa3e2c7114cdb/noddity.js#L48 but if level.js would handle shimming in some other backend for me on Safari, that would be totally fine with me. However, if it turns out that adding in some non-indexedDB support to this library would make it more complex than it needs to be, I would be just as happy with a module that would wrap up that feature-detection and return level.js/leveldown when appropriate. In fact, why didn't I just make that module? huh. |
it would be ideal to have websql where possible before falling back to localstorage, otherwise I agree. @rvagg good call, i'll dig into it a bit more |
@TehShrike we have a new level-browserify. Do you think it make sense to have fallbacks in there? |
@mcollina oh cool, I hadn't seen that one! Falling back on level.js in that module makes sense to me. If it did that, I could switch right over. |
level-browserify uses leveldown in node and level.js (this) in the browser. However, it suffers of the same issues of level.js. I think we might add in there also memdown, so if level.js errors we can switch to memdown. What do you think? |
I could see that, though I feel like I'd want some sort of notification (console.log at least) so that when I was testing I could see that I'd fallen back on less-permanent storage in some browser. In what environment would level.js fail but levelmem succeed? |
A friend of mine testing OSX Yosemite reported that a site of mine using level.js doesn't work - the stack trace he pasted showed a "horrible error" event coming from the Iterator. I don't have the Yosemite beta on any of my machines, so I haven't done any other testing yet. It sounds like Safari in iOS 8 is going to behave pretty identically to Safari in OSX (including IndexedDB support), so maybe if this module gets working in desktop Safari in Yosemite it will work in mobile Safari for free as well. |
@TehShrike if you can paste the error, we might help. |
"horrible error" sounds pretty cool though |
anyone attempt to use localstorage-down for this? |
Yeah, that's what I'm using in Noddity at the moment. |
it looks like youre using it in place of level.js, but it would be nice to have level.js where possible, and polyfill to levelstorage-down in browsers without indexed.db ... are you using levelstorage-down until such a thing has been implemented? |
I used to be checking for IndexedDB support to decide whether or not to use level.js or levelstorage-down,, but since I was getting reports from a Yosemite beta user that but level.js was erroring in Safari Yosemite, I just dropped it until I get around to upgrading to Yosemite and testing level.js on it myself. TehShrike/noddity@95b7019#diff-42f69825340f0b5fa628d80900a46daaL12 |
hmm, yeah im putting off yosemite upgrade myself. surprised there is no issue posted here, as safari 8 is supposed to be fully idb compatible: https://github.com/jensarps/IDBWrapper/issues (at least according to http://caniuse.com/#feat=indexeddb) |
thanks for that diff, i might use somethine like that for now |
Safari latest passes (Sauce Labs) tests now, without a shim. See #92. |
Seems that Safari is not supported here.
I am trying to run the tests and I got these kind of errors:
The text was updated successfully, but these errors were encountered: