Note: See createObjectURL() to understand usage.
createObjectURL(object)objectSee createObjectURL().
A string containing an unpartitioned object URL that can be used to reference the contents of the specified source object.
SecurityError DomExceptionThrown if access was not granted.
document.requestStorageAccess({ createObjectURL: true }).then(
(handle) => {
console.log("createObjectURL access granted");
handle.createObjectURL(new Blob(["foo"]));
},
() => {
console.log("createObjectURL access denied");
},
);Note: See Using the Storage Access API for a more complete example.