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 "XULButtonElement.h"
12 #include "nsXULElement.h"
14 namespace mozilla::dom
{
18 class XULMenuElement final
: public XULButtonElement
{
20 explicit XULMenuElement(already_AddRefed
<mozilla::dom::NodeInfo
>&& aNodeInfo
)
21 : XULButtonElement(std::move(aNodeInfo
)) {}
23 MOZ_CAN_RUN_SCRIPT
void SetActiveMenuChild(Element
*);
24 Element
* GetActiveMenuChild();
26 NS_IMPL_FROMNODE_HELPER(XULMenuElement
,
27 IsAnyOfXULElements(nsGkAtoms::menu
,
28 nsGkAtoms::menulist
));
31 virtual ~XULMenuElement() = default;
32 JSObject
* WrapNode(JSContext
* aCx
, JS::Handle
<JSObject
*> aGivenProto
) final
;
35 } // namespace mozilla::dom
37 #endif // XULMenuElement_h