Contact emails
jar...@chromium.org, m...@chromium.org
Explainer
https://github.com/w3c/FileAPI/pull/117
Spec
https://github.com/w3c/FileAPI/pull/117
Summary
This change adds three new functions to read from a Blob: text(), arrayBuffer(), and stream().
Motivation
Right now, developers can read a blob with a nicely promisified and or streamified API by doing something like:
new Response(my_blob).body
new Response(my_blob).arrayBuffer()
new Response(my_blob).text()
It’s unlikely that developers would stumble upon this workaround because the Fetch API is seemingly unrelated to the File API. The most obvious solution is to use the FileReader API which adds significant complexity.
Risks
Interoperability and Compatibility
Edge: No signals
Firefox: Public support
Safari: No signals
Web / Framework developers: Blob.stream() was suggested by a NodeJS developer
Ergonomics
The new methods are significant ergonomic improvements over the existing FileReader method of reading Blobs. They are based on the methods exposed on Request/Response objects (see https://fetch.spec.whatwg.org/#body-mixin).
Activation
These methods can be polyfilled fairly easily as shown here.
Debuggability
Existing dev tools will work well.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes.
Is this feature fully tested by web-platform-tests?
Yes, link to CL
Link to entry on the feature dashboard
https://www.chromestatus.com/feature/6206980857266176
Requesting approval to ship?
Yes
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAEHjowxV7PxNWG9OS7Y320H8bXVqAUaMJPJKChCTm9VmADSTEg%40mail.gmail.com.
LGTM1
To unsubscribe from this group and stop receiving emails from it, send an email to blin...@chromium.org.