# Yahoo! UI Library

### Menu 2.6.0

Yahoo! UI Library > menu > YAHOO.widget.ContextMenuItem

Show Private Show Protected Show Deprecated

## Class YAHOO.widget.ContextMenuItem - extends YAHOO.widget.MenuItem

Deprecated: As of version 2.4.0 items for YAHOO.widget.ContextMenu instances are of type YAHOO.widget.MenuItem.
Creates an item for a context menu.

### Constructor

YAHOO.widget.ContextMenuItem `( p_oObject , p_oConfig )`

Parameters:
  `p_oObject <String>` String specifying the text of the context menu item.
  `p_oObject <HTMLLIElement>` Object specifying the `<li>` element of the context menu item.
  `p_oObject <HTMLOptGroupElement>` Object specifying the `<optgroup>` element of the context menu item.
  `p_oObject <HTMLOptionElement>` Object specifying the `<option>` element of the context menu item.
  `p_oConfig <Object>` Optional. Object literal specifying the configuration for the context menu item. See configuration class documentation for more details.

#### Properties inherited from YAHOO.widget.MenuItem:

`_oAnchor, _oHelpTextEM, _oOnclickAttributeValue, _oSubmenu, _sClassName, browser, constructor, CSS_CLASS_NAME, CSS_LABEL_CLASS_NAME, element, groupIndex, id, index, parent, srcElement, SUBMENU_TYPE, value`

#### Methods inherited from YAHOO.widget.MenuItem:

`_createRootNodeStructure, _initSubTree, _onSubmenuBeforeHide, addClassNameForState, blur, configChecked, configClassName, configDisabled, configEmphasis, configHelpText, configOnClick, configSelected, configStrongEmphasis, configSubmenu, configTarget, configText, configURL, destroy, focus, getClassNameForState, getNextEnabledSibling, getPreviousEnabledSibling, hasFocus, init, initDefaultConfig, removeClassNameForState, toString`

#### Events inherited from YAHOO.widget.MenuItem:

`blurEvent, clickEvent, destroyEvent, focusEvent, keyDownEvent, keyPressEvent, keyUpEvent, mouseDownEvent, mouseOutEvent, mouseOverEvent, mouseUpEvent,`

#### Configuration attributes inherited from YAHOO.widget.MenuItem:

`checked, classname, disabled, emphasis, helptext, onclick, selected, strongemphasis, submenu, target, text, url,`

Copyright © 2008 Yahoo! Inc. All rights reserved.