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/. */
7 #ifndef mozilla_dom_XULMenuElement_h
8 #define mozilla_dom_XULMenuElement_h
10 #include "nsXULElement.h"
12 namespace mozilla::dom
{
16 class XULMenuElement final
: public nsXULElement
{
18 explicit XULMenuElement(already_AddRefed
<mozilla::dom::NodeInfo
>&& aNodeInfo
)
19 : nsXULElement(std::move(aNodeInfo
)) {}
21 MOZ_CAN_RUN_SCRIPT already_AddRefed
<Element
> GetActiveChild();
22 MOZ_CAN_RUN_SCRIPT
void SetActiveChild(Element
* arg
);
23 MOZ_CAN_RUN_SCRIPT
bool HandleKeyPress(KeyboardEvent
& keyEvent
);
24 MOZ_CAN_RUN_SCRIPT
bool OpenedWithKey();
27 virtual ~XULMenuElement() = default;
28 JSObject
* WrapNode(JSContext
* aCx
, JS::Handle
<JSObject
*> aGivenProto
) final
;
33 } // namespace mozilla::dom
35 #endif // XULMenuElement_h