| 
									
										
										
										
											2023-11-04 14:00:09 -07:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * Copyright (c) 2024, Matthew Olsson <mattco@serenityos.org>. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * SPDX-License-Identifier: BSD-2-Clause | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-27 12:09:58 +12:00
										 |  |  | #include <LibWeb/Bindings/AnimationEventPrototype.h>
 | 
					
						
							| 
									
										
										
										
											2023-11-04 14:00:09 -07:00
										 |  |  | #include <LibWeb/Bindings/Intrinsics.h>
 | 
					
						
							|  |  |  | #include <LibWeb/CSS/AnimationEvent.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace Web::CSS { | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-06 10:16:04 -07:00
										 |  |  | JS_DEFINE_ALLOCATOR(AnimationEvent); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-04 14:00:09 -07:00
										 |  |  | JS::NonnullGCPtr<AnimationEvent> AnimationEvent::create(JS::Realm& realm, FlyString const& type, AnimationEventInit const& event_init) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2024-11-14 05:50:17 +13:00
										 |  |  |     return realm.create<AnimationEvent>(realm, type, event_init); | 
					
						
							| 
									
										
										
										
											2023-11-04 14:00:09 -07:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | WebIDL::ExceptionOr<JS::NonnullGCPtr<AnimationEvent>> AnimationEvent::construct_impl(JS::Realm& realm, FlyString const& type, AnimationEventInit const& event_init) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return create(realm, type, event_init); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | AnimationEvent::AnimationEvent(JS::Realm& realm, FlyString const& type, AnimationEventInit const& event_init) | 
					
						
							|  |  |  |     : DOM::Event(realm, type, event_init) | 
					
						
							|  |  |  |     , m_animation_name(event_init.animation_name) | 
					
						
							|  |  |  |     , m_elapsed_time(event_init.elapsed_time) | 
					
						
							|  |  |  |     , m_pseudo_element(event_init.pseudo_element) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | void AnimationEvent::initialize(JS::Realm& realm) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     Base::initialize(realm); | 
					
						
							| 
									
										
										
										
											2024-03-16 13:13:08 +01:00
										 |  |  |     WEB_SET_PROTOTYPE_FOR_INTERFACE(AnimationEvent); | 
					
						
							| 
									
										
										
										
											2023-11-04 14:00:09 -07:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } |