1 /* vim: set shiftwidth=2 tabstop=8 autoindent cindent expandtab: */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef mozilla_dom_FocusEvent_h_
6 #define mozilla_dom_FocusEvent_h_
8 #include "mozilla/dom/FocusEventBinding.h"
9 #include "mozilla/dom/UIEvent.h"
10 #include "mozilla/EventForwards.h"
11 #include "nsIDOMFocusEvent.h"
16 class FocusEvent
: public UIEvent
,
17 public nsIDOMFocusEvent
21 NS_DECL_NSIDOMFOCUSEVENT
23 // Forward to base class
26 virtual JSObject
* WrapObject(JSContext
* aCx
) MOZ_OVERRIDE
28 return FocusEventBinding::Wrap(aCx
, this);
31 FocusEvent(EventTarget
* aOwner
,
32 nsPresContext
* aPresContext
,
33 InternalFocusEvent
* aEvent
);
35 EventTarget
* GetRelatedTarget();
37 static already_AddRefed
<FocusEvent
> Constructor(const GlobalObject
& aGlobal
,
38 const nsAString
& aType
,
39 const FocusEventInit
& aParam
,
42 nsresult
InitFocusEvent(const nsAString
& aType
,
47 EventTarget
* aRelatedTarget
);
51 } // namespace mozilla
53 #endif // mozilla_dom_FocusEvent_h_