-
-
Notifications
You must be signed in to change notification settings - Fork 652
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
Using Dexie.js inside Chrome App #66
Comments
The reason localStorage is even used is to support Dexie.getDatabaseNames() for non-chromium browsers (Chrome and Opera has a native function to map to, but on other browsers we keep track of the global database list in a localStorage variable). Due to lazy coding, localStorage were updated and managed also on chromium. Please use the latest version of src/Dexie.js instead which will not try to use localStorage where not needed. |
Hello. Still have error in Chrome App, because it continue call I checked, this can help: Dexie.dependencies = {
indexedDB: window._indexedDB || window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB,
IDBKeyRange: window._IDBKeyRange || window.IDBKeyRange || window.webkitIDBKeyRange,
IDBTransaction: window._IDBTransaction || window.IDBTransaction || window.webkitIDBTransaction,
Error: window.Error || String,
SyntaxError: window.SyntaxError || String,
TypeError: window.TypeError || String,
DOMError: window.DOMError || String,
localStorage: ((typeof chrome !== "undefined" && chrome !== null ? chrome.storage : void 0) != null ? null : window.localStorage)
}; |
Thanks. Merged your suggestion in. Passes unit tests. David |
Thanks @dfahlander . All works. |
Hello, I have problem in xul application. It's calling window.localStorage which is not avaiable in xul. If you don't need localStorage as a fallback, you can use this as a workaround:
|
Hello.
I am trying to use Dexie.js inside Chrome App. But inside Chrome app not available localStorage. In this case I get error about this: http://monosnap.com/image/E9hpQMgTXDgGzIpfVyecfJmExRZsYR
Does it possible to use Dexie without localStorage?
The text was updated successfully, but these errors were encountered: