bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js
function createMenuItem(text, innerNodeType) {
		innerNodeType = innerNodeType === undefined ? "span" : innerNodeType; //$NON-NLS-0$
	 	
	 	var element = document.createElement(innerNodeType); //$NON-NLS-0$
		element.className = "dropdownMenuItem"; //$NON-NLS-0$
		element.setAttribute("role", "menuitem");  //$NON-NLS-0$ //$NON-NLS-1$
		element.tabIndex = -1;
		element.style.outline = "none";
		
		if (text) {
			var span = document.createElement("span");  //$NON-NLS-0$
			span.appendChild(document.createTextNode(text));
			span.classList.add("dropdownCommandName"); //$NON-NLS-0$
			element.appendChild(span);
		}
	 	
	 	var li = document.createElement("li"); //$NON-NLS-0$
	 	li.setAttribute("role", "none"); //$NON-NLS-0$ //$NON-NLS-1$
	 	li.appendChild(element); //$NON-NLS-0$
		
		return li;
	}
function createMenuItem(text, innerNodeType) {
		innerNodeType = innerNodeType === undefined ? "span" : innerNodeType; //$NON-NLS-0$
	 	
	 	var element = document.createElement(innerNodeType); //$NON-NLS-0$
		element.className = "dropdownMenuItem"; //$NON-NLS-0$
		element.setAttribute("role", "menuitem");  //$NON-NLS-0$ //$NON-NLS-1$
		element.tabIndex = -1;
		element.style.outline = "none";
		
		if (text) {
			var span = document.createElement("span");  //$NON-NLS-0$
			span.appendChild(document.createTextNode(text));
			span.classList.add("dropdownCommandName"); //$NON-NLS-0$
			element.appendChild(span);
		}
	 	
	 	var li = document.createElement("li"); //$NON-NLS-0$
	 	li.setAttribute("role", "none"); //$NON-NLS-0$ //$NON-NLS-1$
	 	li.appendChild(element); //$NON-NLS-0$
		
		return li;
	}
function createMenuItem ( text , innerNodeType ) { innerNodeType = innerNodeType === undefined ? "span" : innerNodeType ; //$NON-NLS-0$ var element = document . createElement ( innerNodeType ) ; //$NON-NLS-0$ element . className = "dropdownMenuItem" ; //$NON-NLS-0$ element . setAttribute ( "role" , "menuitem" ) ; //$NON-NLS-0$ //$NON-NLS-1$ element . tabIndex = - 1 ; element . style . outline = "none" ; if ( text ) { var span = document . createElement ( "span" ) ; //$NON-NLS-0$ span . appendChild ( document . createTextNode ( text ) ) ; span . classList . add ( "dropdownCommandName" ) ; //$NON-NLS-0$ element . appendChild ( span ) ; } var li = document . createElement ( "li" ) ; //$NON-NLS-0$ li . setAttribute ( "role" , "none" ) ; //$NON-NLS-0$ //$NON-NLS-1$ li . appendChild ( element ) ; //$NON-NLS-0$ return li ; }
Creates a new menu item and returns it to the caller.
@param {String} text The text to display inside the new menu item. Optional.
@param {String} innerNodeType The type of the inner node to create. The default is "span". Optional.
@returns {Object} The top-most new element that was created
Creates a new menu item and returns it to the caller .