← Back to release summary

Simpler reading methods for Blob interface

Category
File APIs
Type
New or changed feature
Status
Enabled by default (Chrome 76)
Intent stage
Evaluate readiness to ship

Summary

Adds three new methods to the Blob interface to perform read operations: text(), arrayBuffer(), and stream().

Motivation

Right now, developers can read a blob with a nicely promisified and/or streamified API by do something like: new Response(my_blob).body .arrayBuffer(), .text() etc The Response wrapping trick feels like a hack, and especially as long as FileReader exists, isn't very discoverable.

Standards & signals

Docs: n/a

Explainers: https://github.com/w3c/FileAPI/pull/117

View on chromestatus.com