Contents Quick Reference
A container used to display menus. It should be placed inside a menu, menulist, or menubutton element. It can contain any element but usually will contain menuitem elements. It is a type of box that defaults to vertical orientation.
Attributes inherited from XUL Element
This event is sent to an element when the user requests to open the context menu for the element. The action to do this varies by platform, but it will typically be a right click. This handler is usually used to dynamically set the commands on a menu when the user requests to display it, or you can use onpopupshowing event. Returning false from this event handler prevents the popup from appearing.
This event is sent to a popup after it has been hidden.
This event is sent to a popup when it is about to be hidden.
This event is sent to a menupopup just before it is popped open. This handler is usually used to dynamically set the commands on a menu when the user requests to display it. Returning false from this event handler prevents the popup from appearing.
This is event is sent to a popup after it has been opened, much like the onload event is sent to a window when it is opened.
The position attribute determines where the popup appears relative to the element the user clicked to invoke the popup. This allows you to place the menu on one side on a button.
Properties and Methods:
Properties and Methods inherited from XUL Element
The currently active menu item. You can modify this value to select a particular menu item.
Closes the popup menu immediately.
Moves the popup to a new location.
Opens a popup menu at the position (x,y) relative to the element. Type should be either the string "popup", "context" or "tooltip". The parameter anchor corresponds to the popupanchor attribute on the element. The parameter align corresponds to the popupalign attribute on the element.
This read-only property holds the nsIPopupBoxObject that implements the popup.
Changes the current size of the popup to a new width and height.