2023-11-04 18:00:09 -03:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2024, Matthew Olsson <mattco@serenityos.org>.
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
2026-04-18 05:54:06 -03:00
|
|
|
#include <LibWeb/Bindings/AnimationEvent.h>
|
2023-11-04 18:00:09 -03:00
|
|
|
#include <LibWeb/Bindings/Intrinsics.h>
|
|
|
|
|
#include <LibWeb/CSS/AnimationEvent.h>
|
|
|
|
|
|
|
|
|
|
namespace Web::CSS {
|
|
|
|
|
|
2024-11-14 12:01:23 -03:00
|
|
|
GC_DEFINE_ALLOCATOR(AnimationEvent);
|
2024-04-06 14:16:04 -03:00
|
|
|
|
2024-11-14 12:01:23 -03:00
|
|
|
GC::Ref<AnimationEvent> AnimationEvent::create(JS::Realm& realm, FlyString const& type, AnimationEventInit const& event_init)
|
2023-11-04 18:00:09 -03:00
|
|
|
{
|
2024-11-13 13:50:17 -03:00
|
|
|
return realm.create<AnimationEvent>(realm, type, event_init);
|
2023-11-04 18:00:09 -03:00
|
|
|
}
|
|
|
|
|
|
2024-11-14 12:01:23 -03:00
|
|
|
WebIDL::ExceptionOr<GC::Ref<AnimationEvent>> AnimationEvent::construct_impl(JS::Realm& realm, FlyString const& type, AnimationEventInit const& event_init)
|
2023-11-04 18:00:09 -03:00
|
|
|
{
|
|
|
|
|
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)
|
|
|
|
|
{
|
2024-03-16 09:13:08 -03:00
|
|
|
WEB_SET_PROTOTYPE_FOR_INTERFACE(AnimationEvent);
|
2025-04-20 11:22:57 -03:00
|
|
|
Base::initialize(realm);
|
2023-11-04 18:00:09 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|