mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
LibWeb: Implement ReadableStream's async iterator
This commit is contained in:
parent
e6463e4ecc
commit
d5d9d999ae
Notes:
github-actions[bot]
2025-04-14 21:44:12 +00:00
Author: https://github.com/trflynn89
Commit: d5d9d999ae
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4338
Reviewed-by: https://github.com/kennethmyhra ✅
8 changed files with 261 additions and 43 deletions
|
@ -24,8 +24,13 @@ dictionary ReadableStreamGetReaderOptions {
|
|||
ReadableStreamReaderMode mode;
|
||||
};
|
||||
|
||||
// https://streams.spec.whatwg.org/#dictdef-readablestreamiteratoroptions
|
||||
dictionary ReadableStreamIteratorOptions {
|
||||
boolean preventCancel = false;
|
||||
};
|
||||
|
||||
// https://streams.spec.whatwg.org/#readablestream
|
||||
[Exposed=*, Transferable]
|
||||
[Exposed=*, Transferable, DefinesAsyncIteratorReturn]
|
||||
interface ReadableStream {
|
||||
constructor(optional object underlyingSource, optional QueuingStrategy strategy = {});
|
||||
|
||||
|
@ -39,7 +44,7 @@ interface ReadableStream {
|
|||
Promise<undefined> pipeTo(WritableStream destination, optional StreamPipeOptions options = {});
|
||||
sequence<ReadableStream> tee();
|
||||
|
||||
// FIXME: async iterable<any>(optional ReadableStreamIteratorOptions options = {});
|
||||
async iterable<any>(optional ReadableStreamIteratorOptions options = {});
|
||||
};
|
||||
|
||||
typedef (ReadableStreamDefaultReader or ReadableStreamBYOBReader) ReadableStreamReader;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue