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

LibWeb: Add ReadableStream.locked/cancel()/getReader()

This commit is contained in:
Matthew Olsson 2023-03-28 20:01:04 -07:00 committed by Linus Groh
parent d8710aa604
commit 36ca1386e8
6 changed files with 63 additions and 1 deletions

View file

@ -1,8 +1,17 @@
// Dummy definition so we can use ReadableStream as a type in Fetch.
#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();
};
// FIXME: typedef (ReadableStreamDefaultReader or ReadableStreamBYOBReader) ReadableStreamReader;
typedef ReadableStreamDefaultReader ReadableStreamReader;