Closed Bug 1896509 Opened 2 months ago Closed 1 month ago

Implement `bytes()` method on Blob for reading bytes into a Uint8Array

Categories

(Core :: DOM: File, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
128 Branch
Tracking Status
firefox128 --- fixed

People

(Reporter: bakkot, Assigned: evilpie)

References

()

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

Steps to reproduce:

See https://github.com/w3c/FileAPI/pull/197. This is like the existing arrayBuffer() method (implemented in https://bugzilla.mozilla.org/show_bug.cgi?id=1557121), but gives you a Uint8Array instead.

Tests at https://github.com/web-platform-tests/wpt/pull/46232

See also https://bugzilla.mozilla.org/show_bug.cgi?id=1896475.

Depends on: 1896475
See Also: 1896475
Assignee: nobody → evilpies
Depends on: 1896472

Does this really "depend on" bug 1896475?

I guess yes given the dependency on BodyUtils. I guess this then would be as easy as adding a method with ConsumeBody(ConsumeType::Bytes)?

Yes exactly, it depends on BodyConsumer. Maybe 5 lines of code. However I am currently waiting for the WPT merge to happen.

Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

Kagami can we signal support on the PR?

Pushed by evilpies@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/b69081020b0d
Implement bytes() method on Blob. r=saschanaz,webidl
Keywords: dev-doc-needed
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch

FF128 MDN docs work for this can be track in https://github.com/mdn/content/issues/33991

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: