Class type Goog.​Ui.​menuItemRenderer

class type [#control]menuItemRenderer = object..end

Inherits


method createDom : (#control as 'a) Js.t -> Dom_html.element Js.t Js.meth

Overrides goog.ui.ControlRenderer#createDom by adding extra markup and stying to the menu item's element if it is selectable or checkable. Returns Root element for the item.

method decorate : 
'b.
'a Js.t ->
(#Dom_html.element as 'b) Js.t -> Dom_html.element Js.t Js.meth

Overrides goog.ui.ControlRenderer#decorate by initializing the menu item to checkable based on whether the element to be decorated has extra stying indicating that it should be. Returns Decorated element.

method getAriaRole : Goog.Gdom.A11y.role_pre Js.optdef Js.meth

Returns The ARIA role.

method getClassForState : 
Component.State.state_pre -> Js.js_string Js.t Js.optdef Js.meth

Takes a single goog.ui.Component.State, and returns the corresponding CSS class name (null if none). Overrides the superclass implementation by using 'highlight' as opposed to 'hover' as the CSS class name suffix for the HOVER state, for backwards compatibility. Returns CSS class representing the given state (undefined if none).

method getContentElement : 
'c. (#Dom_html.element as 'c) Js.t -> Dom_html.element Js.t Js.meth
method getCssClass : Js.js_string Js.t Js.meth
method getStateFromClass : 
Js.js_string Js.t -> Component.State.state_pre Js.meth

Takes a single CSS class name which may represent a component state, and returns the corresponding component state (0x00 if none). Overrides the superclass implementation by treating 'goog-option-selected' as special, for backwards compatibility. Returns state Component state corresponding to the given CSS class (0x00 if none).

method setCheckable : 
'd.
'a Js.t ->
(#Dom_html.element as 'd) Js.t Js.opt -> bool Js.t -> unit Js.meth

Enables/disables checkbox semantics on the menu item.

method setContent : 
'e.
(#Dom_html.element as 'e) Js.t -> controlContent -> unit Js.meth

Takes a menu item's root element, and sets its content to the given text caption or DOM structure. Overrides the superclass immplementation by making sure that the checkbox structure (for selectable/checkable menu items) is preserved.

method setSelectable : 
'f.
'a Js.t ->
(#Dom_html.element as 'f) Js.t Js.opt -> bool Js.t -> unit Js.meth

Enables/disables radio button semantics on the menu item.