Source code

Revision control

Copy as Markdown

Other Tools

[Exposed=*,
//Transferable See Bug 1562065
]
interface ReadableStream {
[Throws]
constructor(optional object underlyingSource, optional QueuingStrategy strategy = {});
readonly attribute boolean locked;
[NewObject]
Promise<void> cancel(optional any reason);
[Throws]
ReadableStreamReader getReader(optional ReadableStreamGetReaderOptions options = {});
[Pref="dom.streams.transform_streams.enabled", Throws]
ReadableStream pipeThrough(ReadableWritablePair transform, optional StreamPipeOptions options = {});
[Pref="dom.streams.pipeTo.enabled", NewObject]
Promise<void> pipeTo(WritableStream destination, optional StreamPipeOptions options = {});
[Throws]
sequence<ReadableStream> tee();
// async iterable<any>(optional ReadableStreamIteratorOptions options = {});
};
enum ReadableStreamReaderMode { "byob" };
dictionary ReadableStreamGetReaderOptions {
ReadableStreamReaderMode mode;
};
dictionary ReadableWritablePair {
required ReadableStream readable;
required WritableStream writable;
};
dictionary StreamPipeOptions {
boolean preventClose = false;
boolean preventAbort = false;
boolean preventCancel = false;
AbortSignal signal;
};