зеркало из https://github.com/mozilla/gecko-dev.git
15 строки
452 B
JavaScript
15 строки
452 B
JavaScript
/* eslint-env worker */
|
|
|
|
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 });
|
|
};
|
|
};
|