Firefox Tomorrow

web api instance method

Blob: bytes() method

View on MDN ↗

Available in 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

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

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.