Bug 1885602 - Part 5: Implement navigating to the SUMO help topic from the menu heade...
[gecko.git] / dom / events / AnimationEvent.h
blobeb402460692c39ff9e1c0507cf590f716592a097
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef mozilla_dom_AnimationEvent_h_
7 #define mozilla_dom_AnimationEvent_h_
9 #include "mozilla/EventForwards.h"
10 #include "mozilla/dom/Event.h"
11 #include "mozilla/dom/AnimationEventBinding.h"
12 #include "nsStringFwd.h"
14 namespace mozilla::dom {
16 class AnimationEvent : public Event {
17 public:
18 AnimationEvent(EventTarget* aOwner, nsPresContext* aPresContext,
19 InternalAnimationEvent* aEvent);
21 NS_INLINE_DECL_REFCOUNTING_INHERITED(AnimationEvent, Event)
23 static already_AddRefed<AnimationEvent> Constructor(
24 const GlobalObject& aGlobal, const nsAString& aType,
25 const AnimationEventInit& aParam);
27 virtual JSObject* WrapObjectInternal(
28 JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override {
29 return AnimationEvent_Binding::Wrap(aCx, this, aGivenProto);
32 void GetAnimationName(nsAString& aAnimationName);
34 float ElapsedTime();
36 void GetPseudoElement(nsAString& aPseudoElement);
38 protected:
39 ~AnimationEvent() = default;
42 } // namespace mozilla::dom
44 already_AddRefed<mozilla::dom::AnimationEvent> NS_NewDOMAnimationEvent(
45 mozilla::dom::EventTarget* aOwner, nsPresContext* aPresContext,
46 mozilla::InternalAnimationEvent* aEvent);
48 #endif // mozilla_dom_AnimationEvent_h_