StorageAccessHandle: phương thức revokeObjectURL()
Khả dụng hạn chế
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Note:
Xem revokeObjectURL() để hiểu cách sử dụng.
Cú pháp
js
revokeObjectURL(objectURL)
Tham số
Giá trị trả về
Không có (undefined).
Ngoại lệ
SecurityErrorDomException-
Được ném ra nếu quyền truy cập không được cấp.
Ví dụ
js
document.requestStorageAccess({ revokeObjectURL: true }).then(
(handle) => {
console.log("revokeObjectURL access granted");
handle.revokeObjectURL(blob_url);
},
() => {
console.log("revokeObjectURL access denied");
},
);
Note: Xem Using the Storage Access API để biết ví dụ đầy đủ hơn.
Thông số kỹ thuật
| Thông số kỹ thuật |
|---|
| Extending Storage Access API (SAA) to non-cookie storage> # dom-storageaccesshandle-revokeobjecturl> |