ReadableStreamDefaultController<T>
Exported By | |
---|---|
All Implemented Interfaces | |
All Known Direct Subclasses |
A controller for a lite ReadableStream.
Provides the enqueue(), error(), and close() methods.
new ReadableStreamDefaultController<T>( stream )
Parameters |
|
---|
Instance Methods
expand_more
this.callPullIfNeeded() → void
void
Overrides | |
---|---|
Parameters | None. |
expand_more
this.canCloseOrEnqueue() → boolean
boolean
Overrides | ||
---|---|---|
Parameters | None. | |
Returns |
|
expand_more
this.clearAlgorithms() → void
void
Overrides | |
---|---|
Parameters | None. |
expand_more
this.close() → void
void
Signals that the ReadableStream should close. The ReadableStream will actually close once all of its chunks have been read. https://streams.spec.whatwg.org/#rs-default-controller-close
Overrides | |
---|---|
Specified by | |
Parameters | None. |
expand_more
this.closeInternal() → void
void
Overrides | |
---|---|
Parameters | None. |
expand_more
this.dequeueFromQueue() → T
T
Overrides | ||
---|---|---|
Parameters | None. | |
Returns |
|
expand_more
this.enqueue( chunk ) → void
void
Enqueues a new chunk into the stream that can be read. https://streams.spec.whatwg.org/#rs-default-controller-enqueue
Overrides | |||||
---|---|---|---|---|---|
Specified by | |||||
Parameters |
|
expand_more
this.enqueueInternal( chunk ) → void
void
Overrides | |||||
---|---|---|---|---|---|
Parameters |
|
expand_more
this.enqueueIntoQueue( chunk ) → void
void
Overrides | |||||
---|---|---|---|---|---|
Parameters |
|
expand_more
this.error( e ) → void
void
Closes the stream with an error. Any future interactions with the controller will throw an error. https://streams.spec.whatwg.org/#rs-default-controller-error
Overrides | |||||
---|---|---|---|---|---|
Specified by | |||||
Parameters |
|
expand_more
this.errorInternal( e ) → void
void
Overrides | |||||
---|---|---|---|---|---|
Parameters |
|
expand_more
this.pullSteps() → Promise<IIterableResult<(T|null)>>
Promise<IIterableResult<(T|null)>>
Overrides | ||
---|---|---|
Parameters | None. | |
Returns |
|
expand_more
this.resetQueue() → void
void
Overrides | |
---|---|
Parameters | None. |
expand_more
this.start( startAlgorithm ) → void
void
Overrides | |||||
---|---|---|---|---|---|
Parameters |
|
expand_more
this.started() → void
void
Overrides | |
---|---|
Parameters | None. |
Instance Properties
expand_more
this.closeRequested → boolean
boolean
expand_more
this.controlledReadableStream → ReadableStream
ReadableStream
expand_more
this.queue → Queue
Queue