summaryrefslogtreecommitdiffstats
path: root/dom/indexedDB/test/browser_permissionsWorker.js
blob: 3712acdebc13007c31fb9dec002088d92c195260 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
onmessage = function(e) {
  var request = indexedDB.open(e.data, { version: 1,
                                         storage: "persistent" });
  request.onsuccess = function(event) {
    postMessage({ status: 'success',
                  isIDBDatabase: (event.target.result instanceof IDBDatabase) });
  }

  request.onerror = function(event) {
    postMessage({ status: 'error', error: event.target.error.name });
  }
}