ReadableStreamController

@native @JSGlobal @JSType
class ReadableStreamController[-T] extends Object

¶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

class Object
trait Any
class Object
trait Matchable
class Any

Value members

Concrete methods

def close(): Unit

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

def desiredSize: Int

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

def enqueue(chunk: T): Unit

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

def enqueue(): Unit
def error(e: Any): Unit

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

Inherited methods

def hasOwnProperty(v: String): Boolean
Inherited from:
Object
def isPrototypeOf(v: Object): Boolean
Inherited from:
Object
def propertyIsEnumerable(v: String): Boolean
Inherited from:
Object
def toLocaleString(): String
Inherited from:
Object
def valueOf(): Any
Inherited from:
Object