mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibWeb: Add an 'enqueue' helper method on TransformStream
This commit is contained in:
parent
9ce0c5914b
commit
5f2b75852f
Notes:
github-actions[bot]
2024-12-25 11:03:07 +00:00
Author: https://github.com/shannonbooth
Commit: 5f2b75852f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3029
Reviewed-by: https://github.com/kennethmyhra ✅
3 changed files with 10 additions and 2 deletions
|
@ -74,6 +74,13 @@ WebIDL::ExceptionOr<GC::Ref<TransformStream>> TransformStream::construct_impl(JS
|
|||
return stream;
|
||||
}
|
||||
|
||||
// https://streams.spec.whatwg.org/#transformstream-enqueue
|
||||
void TransformStream::enqueue(JS::Value chunk)
|
||||
{
|
||||
// To enqueue the JavaScript value chunk into a TransformStream stream, perform ! TransformStreamDefaultControllerEnqueue(stream.[[controller]], chunk).
|
||||
MUST(Streams::transform_stream_default_controller_enqueue(*controller(), chunk));
|
||||
}
|
||||
|
||||
// https://streams.spec.whatwg.org/#transformstream-set-up
|
||||
void TransformStream::set_up(GC::Ref<TransformAlgorithm> transform_algorithm, GC::Ptr<FlushAlgorithm> flush_algorithm, GC::Ptr<CancelAlgorithm> cancel_algorithm)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue