We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS


Represents the box object for a XUL menu.
Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0)

To get access to the box object for a given menu, use code like this:

var boxObject = xulMenu.boxObject.QueryInterface(Components.interfaces.nsIMenuBoxObject);

Method overview

boolean handleKeyPress(in nsIDOMKeyEvent keyEvent);
void openMenu(in boolean openFlag);


Attribute Type Description
activeChild nsIDOMElement The currently active menu or menuitem child of the menu box.
openedWithKey boolean true if the menubar was opened using the keyboard; otherwise false.
Note: For Gecko 2.0, the openedWithKey attribute exists on the nsIMenuBoxObject_MOZILLA_2_0_BRANCH interface. Subsequent Gecko versions will have the attribute on the nsIMenuBoxObject interface.



boolean handleKeyPress(
  in nsIDOMKeyEvent keyEvent
The key event to handle for the menu.
Return value

true if the event was handled, false if not.


void openMenu(
  in boolean openFlag
true to open the menu or false to close it.

See also

Document Tags and Contributors

Contributors to this page: Sheppy, kscarfone, Neil
Last updated by: Sheppy,