Blob:bytes() 方法
备注: 此特性在 Web Worker 中可用。
Blob
接口的 bytes()
方法返回一个 Promise
,该 Promise
兑现为一个包含 blob 内容的字节数组的 Uint8Array
。
语法
js
bytes()
参数
无。
返回值
一个兑现包含 blob 数据的 Uint8Array
对象的 Promise
。
异常
例如,如果用于获取 Blob 数据的读取器抛出异常,则该方法将拒绝返回的 Promise
。
规范
Specification |
---|
File API # dom-blob-bytes |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bytes |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- Has more compatibility info.
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.