nsIMenuBoxObject

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);

Attributes

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.

Methods

handleKeyPress()

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

true if the event was handled, false if not.

openMenu()

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

See also