語法
js
estimate()
引數
無。
返回值
一個 Promise,它會解析為一個未分割槽的 StorageEstimate 物件。
異常
SecurityErrorDomException-
如果未授予訪問許可權,則丟擲此異常。
示例
js
document.requestStorageAccess({ estimate: true }).then(
(handle) => {
console.log("estimate access granted");
await handle.estimate();
},
() => {
console.log("estimate access denied");
},
);
注意:有關更完整的示例,請參閱使用 Storage Access API。
規範
| 規範 |
|---|
| 將儲存訪問API(SAA)擴充套件到非Cookie儲存 # dom-storageaccesshandle-estimate |
瀏覽器相容性
載入中…