MDN self-hosted library · e01.org

StorageAccessHandle: estimate() method

Storage Access API

Storage Access API

[!NOTE] See StorageManager.estimate() to understand usage.

Syntax

estimate()

Parameters

None.

Return value

A Promise that fulfills with an unpartitioned StorageEstimate object.

Exceptions

  • SecurityError DomException
  • : Thrown if access was not granted.

See StorageManager.estimate()

Examples

document.requestStorageAccess({ estimate: true }).then(
  async (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.

Specifications

Browser compatibility

See also