Home

# Class goog.ui.TextareaRenderer

Renderer for {@link goog.ui.Textarea}s. Renders and decorates native HTML textarea elements. Since native HTML textareas have built-in support for many features, overrides many expensive (and redundant) superclass methods to be no-ops.

extends goog.ui.ControlRenderer

Instance Method Summary
| `canDecorate(?Element element) ⇒ boolean` Overrides {@link goog.ui.TextareaRenderer#canDecorate} by returning true only if the element is an HTML textarea.
| `createDom(?goog.ui.Control control) ⇒ ?Element` Returns the textarea's contents wrapped in an HTML textarea element. Sets the textarea's disabled attribute as needed.
| `decorate(?goog.ui.Control control, ?Element element) ⇒ ?Element` Default implementation of {@code decorate} for {@link goog.ui.Control}s. Initializes the control's ID, content, and state based on the ID of the element, its child nodes, and its CSS classes, respectively. Returns the element.
| `getAriaRole() ⇒ (goog.dom.a11y.Role|null|undefined)` Returns the ARIA role to be applied to the control. See http://wiki/Main/ARIA for more info.
| `getCssClass() ⇒ string` Returns the CSS class name to be applied to the root element of all components rendered or decorated using this renderer. The class name is expected to uniquely identify the renderer class, i.e. no two renderer classes are expected to share the same CSS class name.
| `isFocusable(?goog.ui.Control control) ⇒ boolean` Textareas are always focusable as long as they are enabled.
| `setContent(?Element element, ?goog.ui.ControlContent content)` Takes a control's root element, and sets its content to the given text caption or DOM structure. The default implementation replaces the children of the given element. Renderers that create more complex DOM structures must override this method accordingly.
| `setFocusable(?goog.ui.Control control, boolean focusable)` Textareas natively support keyboard focus.
| `setRightToLeft(?Element element, boolean rightToLeft)` Textareas natively support right-to-left rendering.
| `setState(?goog.ui.Control control, ?goog.ui.Component.State state, boolean enable)` Textareas also expose the DISABLED state in the HTML textarea's {@code disabled} attribute.
| `setUpTextarea_(?goog.ui.Control textarea)` Sets up the textarea control such that it doesn't waste time adding functionality that is already natively supported by browser textareas.
| `updateAriaState(?Element element, ?goog.ui.Component.State state, boolean enable)` Textareas don't need ARIA states to support accessibility, so this is a no-op.