Skip to content

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

Open
@saschanaz

Description

@saschanaz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions