Movatterモバイル変換


[0]ホーム

URL:


MDN Web Docs

Blob: arrayBuffer() method

BaselineWidely available

Note: This feature is available inWeb Workers.

ThearrayBuffer() method of theBlobinterface returns aPromise that resolves with the contents of the blob asbinary data contained in anArrayBuffer.

Syntax

js
arrayBuffer()

Parameters

None.

Return value

A promise that resolves with anArrayBuffer that contains the blob'sdata in binary form.

Exceptions

While this method doesn't throw exceptions, it may reject the promise. This can happen,for example, if the reader used to fetch the blob's data throws an exception. Anyexceptions thrown while getting the data will be converted into rejections.

Usage notes

While similar to theFileReader.readAsArrayBuffer() method,arrayBuffer() returns a promise rather than being an event-based API, as isthe case with theFileReader interface's method.

Specifications

Specification
File API
# dom-blob-arraybuffer

Browser compatibility

See also

Help improve MDN

Learn how to contribute.

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp