I can not seem to figure out HOW to use indexedDB inside web worker. I’ve tried a lot of different ways, but indexedDB is always "undefined" in worker scope. I thought it was supposed to be accessible via indexedDB or self.indexedDB???
self.indexedDB = self.indexedDB || self.msIndexedDB || self.mozIndexedDB || self.webkitIndexedDB || self.OIndexedDB;
indexedDB = indexedDB || msIndexedDB || mozIndexedDB || webkitIndexedDB || OIndexedDB;
all are undefined … i even iterated through the properties of the self object, and there was no indexedDB property or method. fwiw, i’m using ff 18, AND, ff nightly (21a), and i tried it with chrome.
Update September 2015:
Accessing IndexedDB from web worker in Firefox is now possible:
https://bugzilla.mozilla.org/show_bug.cgi?id=701634
If you want to use IndexedDB in chrome just use the following line: