blob.bytes()


新增于: v22.3.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); // Outputs: Uint8Array(5) [ 104, 101, 108, 108, 111 ]
}); 

AltStyle によって変換されたページ (->オリジナル) /