Dart API Referencedart:htmlTextAreaElement

TextAreaElement Interface

DOM TextArea objects expose the HTMLTextAreaElement (or HTML 4 HTMLTextAreaElement) interface, which provides special properties and methods (beyond the regular element object interface they also have available to them by inheritance) for manipulating the layout and presentation of <textarea> elements.

Extends

Element

Constructors

Code new TextAreaElement() #

TextAreaElement();

Methods

Code bool checkValidity() #

Returns false if the button is a candidate for constraint validation, and it does not satisfy its constraints. In this case, it also fires an invalid event at the control. It returns true if the control is not a candidate for constraint validation, or if it satisfies its constraints.
bool checkValidity();

Code void select() #

Selects the contents of the control.
void select();

Code void setCustomValidity(String error) #

Sets a custom validity message for the element. If this message is not the empty string, then the element is suffering from a custom validity error, and does not validate.
void setCustomValidity(String error);

Code void setSelectionRange(int start, int end, [String direction]) #

Selects a range of text, and sets selectionStart and selectionEnd. If either argument is greater than the length of the value, it is treated as pointing to the end of the value. If end is less than start, then both are treated as the value of end.
void setSelectionRange(int start, int end, [String direction]);

Fields

Code bool autofocus #

Reflects the autofocus HTML attribute, indicating that the control should have input focus when the page loads
bool autofocus;

Code int cols #

Reflects the cols HTML attribute, indicating the visible width of the text area.
int cols;

Code String defaultValue #

The control's default value, which behaves like the textContent property.
String defaultValue;

Code bool disabled #

Reflects the disabled HTML attribute, indicating that the control is not available for interaction.
bool disabled;

Code final FormElement form #

The containing form element, if this element is in a form. If this element is not contained in a form element:

  • HTML5 this can be the id attribute of any <form> element in the same document.
  • HTML 4 this must be null.
final FormElement form;

Code final NodeList labels #

A list of <label> elements that are labels for this element.
final NodeList labels;

Code int maxLength #

Reflects the maxlength HTML attribute, indicating the maximum number of characters the user can enter. This constraint is evaluated only when the value changes.
int maxLength;

Code String name #

Reflects name HTML attribute, containing the name of the control.
String name;

Code String placeholder #

Reflects the placeholder HTML attribute, containing a hint to the user about what to enter in the control.
String placeholder;

Code bool readOnly #

Reflects the readonly HTML attribute, indicating that the user cannot modify the value of the control.
bool readOnly;

Code bool required #

Reflects the required HTML attribute, indicating that the user must specify a value before submitting the form.
bool required;

Code int rows #

Reflects the rows HTML attribute, indicating the number of visible text lines for the control.
int rows;

Code String selectionDirection #

The direction in which selection occurred. This is "forward" if selection was performed in the start-to-end direction of the current locale, or "backward" for the opposite direction. This can also be "none" if the direction is unknown."
String selectionDirection;

Code int selectionEnd #

The index of the end of selected text. HTML5 If no text is selected, contains the index of the character that follows the input cursor. On being set, the control behaves as if setSelectionRange() had been called with this as the second argument, and selectionStart as the first argument.
int selectionEnd;

Code int selectionStart #

The index of the beginning of selected text. HTML5 If no text is selected, contains the index of the character that follows the input cursor. On being set, the control behaves as if setSelectionRange() had been called with this as the first argument, and selectionEnd as the second argument.
int selectionStart;

Code final int textLength #

The codepoint length of the control's value.
final int textLength;

Code final String type #

The string textarea.
final String type;

Code final String validationMessage #

A localized message that describes the validation constraints that the control does not satisfy (if any). This is the empty string if the control is not a candidate for constraint validation (willValidate is false), or it satisfies its constraints.
final String validationMessage;

Code final ValidityState validity #

The validity states that this element is in.
final ValidityState validity;

Code String value #

The raw value contained in the control.
String value;

Code final bool willValidate #

Indicates whether the element is a candidate for constraint validation. It is false if any conditions bar it from constraint validation.
final bool willValidate;

Code String wrap #

Reflects the wrap HTML attribute, indicating how the control wraps text.
String wrap;

This page includes content from the Mozilla Foundation that is graciously licensed under a Creative Commons: Attribution-Sharealike license. Mozilla has no other association with Dart or dartlang.org. We encourage you to improve the web by contributing to The Mozilla Developer Network.