Blob: bytes() method
Note: This feature is available in Web Workers.
The bytes()
method of the Blob
interface returns a Promise
that resolves with a Uint8Array
containing the contents of the blob as an array of bytes.
Syntax
js
bytes()
Parameters
None.
Return value
A Promise
that fulfills with a Uint8Array
object containing the blob data.
Exceptions
The method will reject the returned Promise
if, for example, the reader used to fetch the blob's data throws an exception.
Specifications
Specification |
---|
File API # dom-blob-bytes |
Browser compatibility
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.