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

LibWeb: Implement ReadableStream's constructor

This commit is contained in:
Matthew Olsson 2023-03-28 19:11:22 -07:00 committed by Linus Groh
parent 66dec1bf54
commit d8710aa604
5 changed files with 160 additions and 3 deletions

View file

@ -17,6 +17,7 @@ namespace Web::Streams {
using SizeAlgorithm = JS::SafeFunction<JS::Completion(JS::Value)>;
using PullAlgorithm = JS::SafeFunction<WebIDL::ExceptionOr<JS::GCPtr<WebIDL::Promise>>()>;
using CancelAlgorithm = JS::SafeFunction<WebIDL::ExceptionOr<JS::GCPtr<WebIDL::Promise>>(JS::Value)>;
using StartAlgorithm = JS::SafeFunction<WebIDL::ExceptionOr<JS::GCPtr<WebIDL::Promise>>()>;
bool is_readable_stream_locked(ReadableStream const&);
@ -45,5 +46,7 @@ void readable_stream_default_controller_clear_algorithms(ReadableStreamDefaultCo
void readable_stream_default_controller_error(ReadableStreamDefaultController&, JS::Value error);
Optional<float> readable_stream_default_controller_get_desired_size(ReadableStreamDefaultController&);
bool readable_stream_default_controller_can_close_or_enqueue(ReadableStreamDefaultController&);
WebIDL::ExceptionOr<void> set_up_readable_stream_default_controller(ReadableStream&, ReadableStreamDefaultController&, StartAlgorithm&&, PullAlgorithm&&, CancelAlgorithm&&, double high_water_mark, SizeAlgorithm&&);
WebIDL::ExceptionOr<void> set_up_readable_stream_default_controller_from_underlying_source(ReadableStream&, JS::Value underlying_source_value, UnderlyingSource, double high_water_mark, SizeAlgorithm&&);
}