ReadableStreamController
¶3.3 Class ReadableStreamController of whatwg spec
The ReadableStreamController constructor cannot be used directly; it only works on a ReadableStream that is in the middle of being constructed.
- Type parameters:
- T
Type of the Chunks to be enqueued to the Stream
- Value parameters:
- stream
can be null
Value members
Concrete methods
The close method will close the controlled readable stream. Consumers will still be able to read any previously-enqueued chunks from the stream, but once those are read, the stream will become closed throws scala.scalajs.js.TypeError if this is not a readable controller
The close method will close the controlled readable stream. Consumers will still be able to read any previously-enqueued chunks from the stream, but once those are read, the stream will become closed throws scala.scalajs.js.TypeError if this is not a readable controller
The desiredSize getter returns the desired size to fill the controlled stream’s internal queue. It can be negative, if the queue is over-full. An underlying source should use this information to determine when and how to apply backpressure.
The desiredSize getter returns the desired size to fill the controlled stream’s internal queue. It can be negative, if the queue is over-full. An underlying source should use this information to determine when and how to apply backpressure.
- Returns:
the size of the strem - no idea if this actually is an int
The enqueue method will enqueue a given chunk in the controlled readable stream.
The enqueue method will enqueue a given chunk in the controlled readable stream.
- Value parameters:
- chunk
throws scala.scalajs.js.RangeError if size is too big
- Returns:
seems like its an undefOr[Int] of the size
The error method will error the readable stream, making all future interactions with it fail with the given error e.
The error method will error the readable stream, making all future interactions with it fail with the given error e.
- Value parameters:
- e
: an error - can this be any type? throws scala.scalajs.js.TypeError