mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:07:35 +00:00
LibWeb: Expose the ReadableStream tee
IDL interface
This just sets up the plumbing to the underlying ReadableStreamTee AO, which as of this commit, will just throw a NotImplemented exception.
This commit is contained in:
parent
5ccd1ff1bf
commit
d8413774df
5 changed files with 43 additions and 1 deletions
|
@ -108,6 +108,13 @@ WebIDL::ExceptionOr<ReadableStreamReader> ReadableStream::get_reader(ReadableStr
|
|||
return ReadableStreamReader { TRY(acquire_readable_stream_byob_reader(*this)) };
|
||||
}
|
||||
|
||||
// https://streams.spec.whatwg.org/#readablestream-tee
|
||||
WebIDL::ExceptionOr<ReadableStreamPair> ReadableStream::tee()
|
||||
{
|
||||
// To tee a ReadableStream stream, return ? ReadableStreamTee(stream, true).
|
||||
return TRY(readable_stream_tee(realm(), *this, true));
|
||||
}
|
||||
|
||||
void ReadableStream::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue