FileReader.readAsArrayBuffer()
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.
FileReader
インターフェイスの readAsArrayBuffer()
メソッドは、指定された Blob
ないし File
オブジェクトの内容を読み込むために使用します。読み込み処理が終了すると readyState
が DONE
に変わり、 loadend
イベントが発行されます。それと同時に、 result
プロパティにはファイルのデータを表す ArrayBuffer
が格納されます。
メモ: Blob.arrayBuffer()
メソッドは、ファイルを ArrayBuffer として読み取るためのプロミスベースのより新しい API です。
構文
js
readAsArrayBuffer(blob)
引数
返値
なし (undefined
)。
仕様書
Specification |
---|
File API # readAsArrayBuffer |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | server | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
readAsArrayBuffer |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.