Skip to content

byob reader support for Blob.stream() #47993

Description

@jimmywarting

Version

all

Platform

No response

Subsystem

No response

What steps will reproduce the bug?

new Blob([1,2]).stream().getReader({mode: 'byob'})

How often does it reproduce? Is there a required condition?

every time

What is the expected behavior? Why is that the expected behavior?

get a byob reader back

What do you see instead?

Uncaught:
TypeError [ERR_INVALID_ARG_VALUE]: The argument 'stream' must be a byte stream. Received ReadableStream { locked: false, state: 'readable', supportsBYOB: false }
    at __node_internal_captureLargerStackTrace (node:internal/errors:490:5)
    at new NodeError (node:internal/errors:399:5)
    at setupReadableStreamBYOBReader (node:internal/webstreams/readablestream:2149:11)
    at new ReadableStreamBYOBReader (node:internal/webstreams/readablestream:912:5)
    at ReadableStream.getReader (node:internal/webstreams/readablestream:350:12) {
  code: 'ERR_INVALID_ARG_VALUE'
}

Additional information

Works in Firefox, Deno

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    web streamsIssues and PRs related to the Web Streams API.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions