Intent to Ship: FileAPI: Blob.bytes()

38 views
Skip to first unread message

Chromestatus

unread,
10:50 AM (9 hours ago) 10:50 AM
to blin...@chromium.org, zees...@gmail.com, zi...@chromium.org
Contact emails
zees...@gmail.com, zi...@chromium.org

Specification
https://www.w3.org/TR/FileAPI

Design docs
No information provided
https://w3c.github.io/FileAPI/#dom-blob-bytes

Summary
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.

Blink component
Blink>Storage>FileAPI

Web Feature ID
file

Motivation
Before this change developers could not access an ArrayBuffer directly and had to create a Uint8Array view, and some APIs returned different types which leading to inconsistency. To improve this, design principles have changed[1] in w3c tag side, so the spec was updated[2] accordingly. The new spec removes those hassles, and because WebKit, Firefox and Node.js already support it, bringing it to Chromium will improve interoperability as well. [1] https://github.com/w3ctag/design-principles/issues/463 [2] https://github.com/w3ctag/design-principles/pull/480 [3] https://github.com/w3c/FileAPI/pull/198

Initial public proposal
No information provided

TAG review
No information provided

TAG review status
Not applicable

Risks


Interoperability and Compatibility
Safari 18 and Firefox 128 have already shipped the feature.

Gecko: Shipped/Shipping (https://www.firefox.com/en-US/firefox/128.0/releasenotes)

WebKit: Shipped/Shipping (https://webkit.org/blog/15865/webkit-features-in-safari-18-0)

Web developers: No signals

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

No information provided


Debuggability
No information provided

Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?
Yes
All Blob APIs are exposed and platform-independent, and the bytes() API is also supported on all platforms.

Is this feature fully tested by web-platform-tests?
Yes
https://wpt.fyi/results/FileAPI/Blob-methods-from-detached-frame.html https://wpt.fyi/results/FileAPI/blob/Blob-bytes.any.html https://wpt.fyi/results/FileAPI/blob/Blob-bytes.any.worker.html

Flag name on about://flags
No information provided

Finch feature name
No information provided

Non-finch justification
No information provided

Rollout plan
Will ship enabled for all users

Requires code in //chrome?
False

Estimated milestones

No milestones specified



Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

No information provided

Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/4830298126417920?gate=5146453756084224

Links to previous Intent discussions
Intent to Prototype: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/688952f5.2b0a0220.35091d.0040.GAE%40google.com


This intent message was generated by Chrome Platform Status.
Reply all
Reply to author
Forward
0 new messages