1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 20:57:35 +00:00

LibWeb: Add ReadableStreamGetReaderOptions to ReadableStream.getReader

Co-Authored-By: Matthew Olsson <mattco@serenityos.org>
This commit is contained in:
Shannon Booth 2023-06-29 20:53:19 +12:00 committed by Linus Groh
parent 729f4838c2
commit 0f040456a7
4 changed files with 26 additions and 8 deletions

View file

@ -2,6 +2,14 @@
#import <Streams/ReadableStreamBYOBReader.idl>
#import <Streams/ReadableStreamDefaultReader.idl>
// https://streams.spec.whatwg.org/#enumdef-readablestreamreadermode
enum ReadableStreamReaderMode { "byob" };
// https://streams.spec.whatwg.org/#dictdef-readablestreamgetreaderoptions
dictionary ReadableStreamGetReaderOptions {
ReadableStreamReaderMode mode;
};
// https://streams.spec.whatwg.org/#readablestream
[Exposed=*, Transferable]
interface ReadableStream {
@ -10,8 +18,7 @@ interface ReadableStream {
readonly attribute boolean locked;
Promise<undefined> cancel(optional any reason);
// FIXME: optional ReadableStreamGetReaderOptions options = {}
ReadableStreamReader getReader();
ReadableStreamReader getReader(optional ReadableStreamGetReaderOptions options = {});
};
typedef (ReadableStreamDefaultReader or ReadableStreamBYOBReader) ReadableStreamReader;