ladybird/Userland/Libraries/LibWeb/Streams/ReadableStreamBYOBReader.idl
Kenneth Myhra 907dc84c1e LibWeb: Implement min option for ReadableStreamBYOBReader.read()
When the min option is given the read will only be fulfilled when there
are min or more elements available in the readable byte stream.

When the min option is not given the default value for min is 1.
2024-07-11 11:55:15 +02:00

18 lines
610 B
Text

#import <Streams/ReadableStream.idl>
#import <Streams/ReadableStreamDefaultReader.idl>
#import <Streams/ReadableStreamGenericReader.idl>
// https://streams.spec.whatwg.org/#readablestreambyobreader
[Exposed=*]
interface ReadableStreamBYOBReader {
constructor(ReadableStream stream);
Promise<ReadableStreamReadResult> read(ArrayBufferView view, optional ReadableStreamBYOBReaderReadOptions options = {});
undefined releaseLock();
};
ReadableStreamBYOBReader includes ReadableStreamGenericReader;
dictionary ReadableStreamBYOBReaderReadOptions {
[EnforceRange] unsigned long long min = 1;
};