Home

# Class goog.ui.FlatButtonRenderer

Flat renderer for {@link goog.ui.Button}s. Flat buttons can contain almost arbitrary HTML content, will flow like inline elements, but can be styled like block-level elements.

extends goog.ui.ButtonRenderer

Instance Method Summary
| `canDecorate(?Element element) ⇒ boolean` Returns true if this renderer can decorate the element. Overrides {@link goog.ui.ButtonRenderer#canDecorate} by returning true if the element is a DIV, false otherwise.
| `createDom(?goog.ui.Button button) ⇒ ?Element` Returns the control's contents wrapped in a div element, with the renderer's own CSS class and additional state-specific classes applied to it, and the button's disabled attribute set or cleared as needed. Overrides {@link goog.ui.ButtonRenderer#createDom}.
| `decorate(?goog.ui.Button button, ?Element element) ⇒ ?Element` Takes an existing element and decorates it with the flat button control. Initializes the control's ID, content, tooltip, value, and state based on the ID of the element, its child nodes, and its CSS classes, respectively. Returns the element. Overrides {@link goog.ui.ButtonRenderer#decorate}.
| `getAriaRole() ⇒ (goog.dom.a11y.Role|null|undefined)` Returns the ARIA role to be applied to flat buttons.
| `getCssClass() ⇒ string` Returns the CSS class to be applied to the root element of components rendered using this renderer.
| `getValue(?Element element) ⇒ null` Flat buttons can't use the value attribute since they are div elements. Overrides {@link goog.ui.ButtonRenderer#getValue} to prevent trying to access the element's value.