Skip to content
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

Make IndexedDB work with web workers on Chrome #14

Open
terrycojones opened this issue Mar 10, 2013 · 0 comments · Fixed by #15
Open

Make IndexedDB work with web workers on Chrome #14

terrycojones opened this issue Mar 10, 2013 · 0 comments · Fixed by #15

Comments

@terrycojones
Copy link
Contributor

Web workers do not have access to the window object, so these lines do not work for finding the IndexedDB API

        fullproof.store.indexedDB =  window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.msIndexedDB;
        fullproof.store.IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction || window.mozIDBTransaction || window.msIDBTransaction || {};

fortunately, on Chrome at least, indexedDB and IDBTransaction are both present in the global scope, so there is a trivial fix (coming up in a pull request).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant