summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Streams/ReadableStream.idl
blob: c38656e29bd69530c023f9dbbdf574820217413a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#import <Streams/ReadableStreamBYOBReader.idl>
#import <Streams/ReadableStreamDefaultReader.idl>

// https://streams.spec.whatwg.org/#readablestream
[Exposed=*, Transferable]
interface ReadableStream {
    // FIXME: optional QueuingStrategy strategy = {}
    constructor(optional object underlyingSource);

    readonly attribute boolean locked;

    Promise<undefined> cancel(optional any reason);
    // FIXME: optional ReadableStreamGetReaderOptions options = {}
    ReadableStreamReader getReader();
};

typedef (ReadableStreamDefaultReader or ReadableStreamBYOBReader) ReadableStreamReader;