mirror of
https://github.com/RGBCube/serenity
synced 2025-07-23 14:07:42 +00:00
LibWeb: Implement TransformStreamDefaultController::error()
This commit is contained in:
parent
9efcc01387
commit
2d0a2756b4
3 changed files with 11 additions and 1 deletions
|
@ -43,4 +43,13 @@ Optional<double> TransformStreamDefaultController::desired_size()
|
|||
return readable_stream_default_controller_get_desired_size(*readable_controller);
|
||||
}
|
||||
|
||||
// https://streams.spec.whatwg.org/#ts-default-controller-error
|
||||
WebIDL::ExceptionOr<void> TransformStreamDefaultController::error(Optional<JS::Value> reason)
|
||||
{
|
||||
// 1. Perform ? TransformStreamDefaultControllerError(this, e).
|
||||
TRY(transform_stream_default_controller_error(*this, reason.has_value() ? reason.value() : JS::js_undefined()));
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@ public:
|
|||
virtual ~TransformStreamDefaultController() override;
|
||||
|
||||
Optional<double> desired_size();
|
||||
WebIDL::ExceptionOr<void> error(Optional<JS::Value> reason = {});
|
||||
|
||||
auto& flush_algorithm() { return m_flush_algorithm; }
|
||||
void set_flush_algorithm(Optional<FlushAlgorithm>&& value) { m_flush_algorithm = move(value); }
|
||||
|
|
|
@ -4,6 +4,6 @@ interface TransformStreamDefaultController {
|
|||
readonly attribute unrestricted double? desiredSize;
|
||||
|
||||
// FIXME: undefined enqueue(optional any chunk);
|
||||
// FIXME: undefined error(optional any reason);
|
||||
undefined error(optional any reason);
|
||||
// FIXME: undefined terminate();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue