JavaScripture
Contribute via GitHub Feedback

ReadableStreamDefaultReader : Object

Constructors

new ReadableStreamDefaultReader(stream : ReadableStream) : ReadableStreamDefaultReader

Instance Properties

closed : Promise<undefined>  

A promise that resolves when the stream closes.

Example:

Run

Results:

 

Instance Methods

cancel([reason : Object]) : Promise<undefined>

Causes the stream to cancel and stop producing new chunks. Causes the UnderlyingSource's cancel method to be called.

Example:

Run

Results:

 

read() : Promise

Promise return type: { value : Object, done : Boolean }

releaseLock() : undefined;

Release the lock on the ReadableStream so another reader can read from the stream.

Example:

Run

Results: