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 Compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support

52.0

No support[1] ?

39

?
Feature Android Webview Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support 52 52 No support[1] ? 39 ?

[1] Readable streams are currently enabled in Firefox, but hidden behind the dom.streams.enabled and javascript.options.streams prefs.

© 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