MDN self-hosted library · e01.org

StorageAccessHandle: estimate() method

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

js
document.requestStorageAccess({ estimate: true }).then(
  async (handle) => {
    console.log("estimate access granted");
    await handle.estimate();
  },
  () => {
    console.log("estimate access denied");
  },
);