2021-09-18 20:41:55 -03:00
|
|
|
/*
|
2024-10-04 08:19:50 -03:00
|
|
|
* Copyright (c) 2021, Andreas Kling <andreas@ladybird.org>
|
2021-09-18 20:41:55 -03:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
2026-04-18 05:54:06 -03:00
|
|
|
#include <LibWeb/Bindings/XMLHttpRequestEventTarget.h>
|
2021-09-18 20:41:55 -03:00
|
|
|
#include <LibWeb/HTML/EventHandler.h>
|
|
|
|
|
#include <LibWeb/XHR/EventNames.h>
|
|
|
|
|
#include <LibWeb/XHR/XMLHttpRequestEventTarget.h>
|
|
|
|
|
|
|
|
|
|
namespace Web::XHR {
|
|
|
|
|
|
2021-09-19 10:08:01 -03:00
|
|
|
#undef __ENUMERATE
|
2022-09-24 12:02:41 -03:00
|
|
|
#define __ENUMERATE(attribute_name, event_name) \
|
|
|
|
|
void XMLHttpRequestEventTarget::set_##attribute_name(WebIDL::CallbackType* value) \
|
|
|
|
|
{ \
|
|
|
|
|
set_event_handler_attribute(event_name, value); \
|
|
|
|
|
} \
|
|
|
|
|
WebIDL::CallbackType* XMLHttpRequestEventTarget::attribute_name() \
|
|
|
|
|
{ \
|
|
|
|
|
return event_handler_attribute(event_name); \
|
2021-09-19 10:08:01 -03:00
|
|
|
}
|
|
|
|
|
ENUMERATE_XML_HTTP_REQUEST_EVENT_TARGET_EVENT_HANDLERS(__ENUMERATE)
|
|
|
|
|
#undef __ENUMERATE
|
2021-09-18 20:41:55 -03:00
|
|
|
|
|
|
|
|
}
|