Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read all bytes: Why only Uint8Array instead of general BufferSource? #1299

Open
saschanaz opened this issue Nov 14, 2023 · 0 comments
Open

Comments

@saschanaz
Copy link
Member

saschanaz commented Nov 14, 2023

What is the issue with the Streams Standard?

I just found that the chunk steps of read all bytes requires Uint8Array:

chunk steps, given chunk

  1. If chunk is not a Uint8Array object, call failureSteps with a TypeError and abort these steps.

Maybe it can be BufferSource instead?

(Context: Given this algorithm is implemented in Gecko as a pipe to internal output stream, I was investigating whether the code for WebTransport write could be reused here. WT accepts BufferSource which makes more sense to me.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant