W3cubDocs

/DOM

ReadableByteStreamController

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The ReadableByteStreamController interface of the Streams API represents a controller allowing control of a ReadableStream's state and internal queue. Byte stream controllers are for byte streams.

Constructor

ReadableByteStreamController()
Creates and returns a ReadableByteStreamController() object instance.

Properties

ReadableByteStreamController.byobRequest
Returns the current BYOB pull request.
ReadableByteStreamController.desiredSize
Returns the desired size required to fill the stream's internal queue.

Methods

ReadableByteStreamController.close()
Closes the associated stream.
ReadableByteStreamController.enqueue()
Enqueues a given chunk in the associated stream.
ReadableByteStreamController.error()
Causes any future interactions with the associated stream to error.

Examples

TBD.

Specifications

Specification Status Comment
Streams
The definition of 'ReadableByteStreamController' in that specification.
Living Standard Initial definition

Browser compatibilityUpdate compatibility data on GitHub

Desktop
Chrome Edge Firefox Internet Explorer Opera Safari
Basic support No No No No No No
ReadableByteStreamController() constructor No No No No No No
byobRequest No No No No No No
desiredSize No No No No No No
close No No No No No No
enqueue No No No No No No
error No No No No No No
Mobile
Android webview Chrome for Android Edge Mobile Firefox for Android Opera for Android iOS Safari Samsung Internet
Basic support No No No No No No ?
ReadableByteStreamController() constructor No No No No No No ?
byobRequest No No No No No No ?
desiredSize No No No No No No ?
close No No No No No No ?
enqueue No No No No No No ?
error No No No No No No ?

© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/ReadableByteStreamController