新增于: v22.3.0, v20.16.0
blob.bytes()
方法将 Blob
对象的字节作为 Promise<Uint8Array>
返回。
¥The blob.bytes()
method returns the byte of the Blob
object as a Promise<Uint8Array>
.
const blob = new Blob(['hello']);
blob.bytes().then((bytes) => {
console.log(bytes);
});