Newly available Newly available. Verify your target environments before adopting.

Browser support

Feature Desktop Mobile
Chrome
Edge
Firefox
Safari
Chrome Android
Safari iOS
89
89
102
26.4
89
26.4

The byobRequest read-only property of the ReadableByteStreamController interface returns the current BYOB request, or null if there are no pending requests.

89
89
102
26.4
89
26.4

The close() method of the ReadableByteStreamController interface closes the associated stream.

89
89
102
26.4
89
26.4

The desiredSize read-only property of the ReadableByteStreamController interface returns the number of bytes required to fill the stream's internal queue to its "desired size".

89
89
102
26.4
89
26.4

The enqueue() method of the ReadableByteStreamController interface enqueues a given chunk on the associated readable byte stream (the chunk is transferred into the stream's internal queues).

89
89
102
26.4
89
26.4

The error() method of the ReadableByteStreamController interface causes any future interactions with the associated stream to error with the specified reason.

89
89
102
26.4
89
26.4

The ReadableStreamBYOBReader interface of the Streams API defines a reader for a ReadableStream that supports zero-copy reading from an underlying byte source. It is used for efficient copying from underlying sources where the data is delivered as an "anonymous" sequence of bytes, such as files.

89
89
102
26.4
89
26.4

The cancel() method of the ReadableStreamBYOBReader interface returns a Promise that resolves when the stream is canceled. Calling this method signals a loss of interest in the stream by a consumer.

89
89
102
26.4
89
26.4

The closed read-only property of the ReadableStreamBYOBReader interface returns a Promise that fulfills when the stream closes, or rejects if the stream throws an error or the reader's lock is released.

89
89
102
26.4
89
26.4

The read() method of the ReadableStreamBYOBReader interface is used to read data into a view on a user-supplied buffer from an associated readable byte stream. A request for data will be satisfied from the stream's internal queues if there is any data present. If the stream queues are empty, the request may be supplied as a zero-copy transfer from the…

89
89
102
26.4
89
26.4
read (options min parameter)

`options.min` parameter

140
140
134
140

The ReadableStreamBYOBReader() constructor creates and returns a ReadableStreamBYOBReader object instance.

89
89
102
26.4
89
26.4

The releaseLock() method of the ReadableStreamBYOBReader interface releases the reader's lock on the stream. After the lock is released, the reader is no longer active.

89
89
102
26.4
89
26.4
releaseLock (reject pending read request)

`releaseLock()` rejects pending read requests

105
105
102
105

The ReadableStreamBYOBRequest interface of the Streams API represents a "pull request" for data from an underlying source that will made as a zero-copy transfer to a consumer (bypassing the stream's internal queues).

89
89
102
26.4
89
26.4

The respond() method of the ReadableStreamBYOBRequest interface is used to signal to the associated readable byte stream that the specified number of bytes were written into the ReadableStreamBYOBRequest.view.

89
89
102
26.4
89
26.4

The respondWithNewView() method of the ReadableStreamBYOBRequest interface specifies a new view that the consumer of the associated readable byte stream should write to instead of ReadableStreamBYOBRequest.view.

89
89
102
26.4
89
26.4

The view getter property of the ReadableStreamBYOBRequest interface returns the current view.

89
89
102
26.4
89
26.4
1+Supported (version) Not supported Has note Sub-feature descriptions sourced from MDN Web Docs (CC BY-SA 2.5)
Notes 1 item(s)
Implementation note
  • Before version 105, `releaseLock()` throws instead of rejecting.
Notes 1 item(s)
Implementation note
  • Before version 105, `releaseLock()` throws instead of rejecting.
Notes 1 item(s)
Implementation note
  • Before version 105, `releaseLock()` throws instead of rejecting.

Use cases

  • Using Readable byte streams

    The ReadableByteStreamController interface of the Streams API represents a controller for a readable byte stream.

Cautions

  • May not be supported in older browsers.

Implementation notes

  • Some APIs require a secure context (HTTPS) or user activation. Check the requirements before use.