mirror of
https://github.com/RGBCube/serenity
synced 2025-07-23 09:37:34 +00:00
LibWeb: Implement TransformStreamDefaultController::terminate()
This commit is contained in:
parent
e1740938fc
commit
4d4fc53f5c
3 changed files with 11 additions and 1 deletions
|
@ -61,4 +61,13 @@ WebIDL::ExceptionOr<void> TransformStreamDefaultController::error(Optional<JS::V
|
|||
return {};
|
||||
}
|
||||
|
||||
// https://streams.spec.whatwg.org/#ts-default-controller-terminate
|
||||
WebIDL::ExceptionOr<void> TransformStreamDefaultController::terminate()
|
||||
{
|
||||
// 1. Perform ? TransformStreamDefaultControllerTerminate(this).
|
||||
TRY(transform_stream_default_controller_terminate(*this));
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ public:
|
|||
Optional<double> desired_size();
|
||||
WebIDL::ExceptionOr<void> enqueue(Optional<JS::Value> chunk);
|
||||
WebIDL::ExceptionOr<void> error(Optional<JS::Value> reason = {});
|
||||
WebIDL::ExceptionOr<void> terminate();
|
||||
|
||||
auto& flush_algorithm() { return m_flush_algorithm; }
|
||||
void set_flush_algorithm(Optional<FlushAlgorithm>&& value) { m_flush_algorithm = move(value); }
|
||||
|
|
|
@ -5,5 +5,5 @@ interface TransformStreamDefaultController {
|
|||
|
||||
undefined enqueue(optional any chunk);
|
||||
undefined error(optional any reason);
|
||||
// FIXME: undefined terminate();
|
||||
undefined terminate();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue