Note: See StorageManager.estimate() to understand usage.
estimate()None.
A Promise that fulfills with an unpartitioned StorageEstimate object.
SecurityError DomExceptionThrown if access was not granted.
document.requestStorageAccess({ estimate: true }).then(
(handle) => {
console.log("estimate access granted");
await handle.estimate();
},
() => {
console.log("estimate access denied");
},
);Note: See Using the Storage Access API for a more complete example.