StorageAccessHandle: indexedDB property
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
TheindexedDB property of theStorageAccessHandle interface returns an unpartitionedIDBFactory object if access was granted, and throws aSecurityErrorDOMException otherwise.
In this article
Value
AnIDBFactory object.
Examples
js
document.requestStorageAccess({ indexedDB: true }).then( (handle) => { console.log("indexedDB access granted"); await handle.indexedDB.deleteDatabase("foo"); }, () => { console.log("indexedDB access denied"); },);Note:SeeUsing the Storage Access API for a more complete example.
Specifications
| Specification |
|---|
| Extending Storage Access API (SAA) to non-cookie storage> # dom-storageaccesshandle-indexeddb> |