mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-04 16:46:08 +00:00
LibWeb: Implement AbortSignal.abort()
This returns an AbortSignal that is already set as aborted.
This commit is contained in:
parent
fa95e5ec0e
commit
3b7c252175
Notes:
sideshowbarker
2024-07-18 03:20:18 +09:00
Author: https://github.com/tcl3
Commit: 3b7c252175
Pull-request: https://github.com/SerenityOS/serenity/pull/23279
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/kalenikaliaksandr
5 changed files with 43 additions and 1 deletions
|
@ -37,11 +37,14 @@ public:
|
|||
|
||||
// https://dom.spec.whatwg.org/#dom-abortsignal-reason
|
||||
JS::Value reason() const { return m_abort_reason; }
|
||||
void set_reason(JS::Value reason) { m_abort_reason = reason; }
|
||||
|
||||
JS::ThrowCompletionOr<void> throw_if_aborted() const;
|
||||
|
||||
void follow(JS::NonnullGCPtr<AbortSignal> parent_signal);
|
||||
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<AbortSignal>> abort(JS::VM&, JS::Value reason);
|
||||
|
||||
private:
|
||||
explicit AbortSignal(JS::Realm&);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue