| 
									
										
										
										
											2021-09-19 01:41:55 +02:00
										 |  |  | /*
 | 
					
						
							| 
									
										
										
										
											2024-10-04 13:19:50 +02:00
										 |  |  |  * Copyright (c) 2021, Andreas Kling <andreas@ladybird.org> | 
					
						
							| 
									
										
										
										
											2021-09-19 01:41:55 +02:00
										 |  |  |  * | 
					
						
							|  |  |  |  * SPDX-License-Identifier: BSD-2-Clause | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-27 12:09:58 +12:00
										 |  |  | #include <LibWeb/Bindings/XMLHttpRequestEventTargetPrototype.h>
 | 
					
						
							| 
									
										
										
										
											2021-09-19 01:41:55 +02:00
										 |  |  | #include <LibWeb/HTML/EventHandler.h>
 | 
					
						
							|  |  |  | #include <LibWeb/XHR/EventNames.h>
 | 
					
						
							|  |  |  | #include <LibWeb/XHR/XMLHttpRequestEventTarget.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace Web::XHR { | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-09-19 15:08:01 +02:00
										 |  |  | #undef __ENUMERATE
 | 
					
						
							| 
									
										
										
										
											2022-09-24 16:02:41 +01: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 15:08:01 +02:00
										 |  |  |     } | 
					
						
							|  |  |  | ENUMERATE_XML_HTTP_REQUEST_EVENT_TARGET_EVENT_HANDLERS(__ENUMERATE) | 
					
						
							|  |  |  | #undef __ENUMERATE
 | 
					
						
							| 
									
										
										
										
											2021-09-19 01:41:55 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | } |