#pragma once
#include "AnimationEventBase.h"
namespace WebCore {
class TransitionEvent final : public AnimationEventBase {
WTF_MAKE_ISO_ALLOCATED(TransitionEvent);
public:
static Ref<TransitionEvent> create(const AtomString& type, const String& propertyName, double elapsedTime, const String& pseudoElement, Optional<Seconds> timelineTime, WebAnimation* animation)
{
return adoptRef(*new TransitionEvent(type, propertyName, elapsedTime, pseudoElement, timelineTime, animation));
}
struct Init : EventInit {
String propertyName;
double elapsedTime { 0 };
String pseudoElement;
};
static Ref<TransitionEvent> create(const AtomString& type, const Init& initializer, IsTrusted isTrusted = IsTrusted::No)
{
return adoptRef(*new TransitionEvent(type, initializer, isTrusted));
}
virtual ~TransitionEvent();
bool isTransitionEvent() const final { return true; }
const String& propertyName() const;
double elapsedTime() const;
const String& pseudoElement() const;
EventInterface eventInterface() const override;
private:
TransitionEvent(const AtomString& type, const String& propertyName, double elapsedTime, const String& pseudoElement, Optional<Seconds> timelineTime, WebAnimation*);
TransitionEvent(const AtomString& type, const Init& initializer, IsTrusted);
String m_propertyName;
double m_elapsedTime;
String m_pseudoElement;
};
}
SPECIALIZE_TYPE_TRAITS_ANIMATION_EVENT_BASE(TransitionEvent, isTransitionEvent())