YUI recommends YUI 3.

YUI 2 has been deprecated since 2011. This site acts as an archive for files and documentation.

Yahoo! UI Library

Menu  2.3.0

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

Show Private Show Protected

Class YAHOO.widget.ContextMenuItem - extends 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.

Methods

init

void init ( p_oObject , p_oConfig )
The ContextMenuItem class's initialization method. This method is automatically called by the constructor, and sets up all DOM references for pre-existing markup, and creates required markup if it is not already present.
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.
Returns: void

toString

String toString ( )
Returns a string representing the context menu item.
Returns: String


Copyright © 2007 Yahoo! Inc. All rights reserved.