StorageAccessHandle: indexedDB-Eigenschaft
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Die indexedDB-Eigenschaft des StorageAccessHandle-Interfaces gibt ein nicht partitioniertes IDBFactory-Objekt zurück, wenn der Zugriff gewährt wurde. Andernfalls wird eine SecurityError-DOMException ausgelöst.
Wert
Ein IDBFactory-Objekt.
Beispiele
js
document.requestStorageAccess({ indexedDB: true }).then(
(handle) => {
console.log("indexedDB access granted");
await handle.indexedDB.deleteDatabase("foo");
},
() => {
console.log("indexedDB access denied");
},
);
Hinweis: Für ein vollständigeres Beispiel siehe Verwendung der Storage Access API.
Spezifikationen
| Specification |
|---|
| Extending Storage Access API (SAA) to non-cookie storage> # dom-storageaccesshandle-indexeddb> |