mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:58:11 +00:00
LibWeb: Implement AbortSignal.onabort
This commit is contained in:
parent
de72332920
commit
971d60c329
3 changed files with 15 additions and 1 deletions
|
@ -8,6 +8,7 @@
|
|||
#include <LibWeb/DOM/AbortSignal.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/EventDispatcher.h>
|
||||
#include <LibWeb/HTML/EventHandler.h>
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
|
@ -50,4 +51,14 @@ void AbortSignal::signal_abort()
|
|||
dispatch_event(Event::create(HTML::EventNames::abort));
|
||||
}
|
||||
|
||||
void AbortSignal::set_onabort(HTML::EventHandler event_handler)
|
||||
{
|
||||
set_event_handler_attribute(HTML::EventNames::abort, event_handler);
|
||||
}
|
||||
|
||||
HTML::EventHandler AbortSignal::onabort()
|
||||
{
|
||||
return event_handler_attribute(HTML::EventNames::abort);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue