Class HTMLTextAreaElement

All Implemented Interfaces:
Serializable, Cloneable, org.htmlunit.corejs.javascript.ConstProperties, org.htmlunit.corejs.javascript.debug.DebuggableObject, org.htmlunit.corejs.javascript.Scriptable, org.htmlunit.corejs.javascript.SymbolScriptable

public class HTMLTextAreaElement extends HTMLElement
The JavaScript object HTMLTextAreaElement.
See Also:
  • Field Details

    • labels_

      private NodeList labels_
      "Live" labels collection; has to be a member to have equality (==) working.
  • Constructor Details

    • HTMLTextAreaElement

      public HTMLTextAreaElement()
      Creates an instance.
  • Method Details

    • jsConstructor

      public void jsConstructor()
      JavaScript constructor.
      Overrides:
      jsConstructor in class HTMLElement
    • getType

      public String getType()
      Returns the type of this input.
      Returns:
      the type of this input
    • getDomNodeOrDie

      public HtmlTextArea getDomNodeOrDie()
      Returns the DOM node that corresponds to this JavaScript object or throw an exception if one cannot be found.
      Overrides:
      getDomNodeOrDie in class HTMLElement
      Returns:
      the DOM node
    • getValue

      public String getValue()
      Returns the value of the value attribute.
      Overrides:
      getValue in class HTMLElement
      Returns:
      the value of the value attribute
    • setValue

      public void setValue(Object value)
      Sets the value of the value attribute.
      Overrides:
      setValue in class HTMLElement
      Parameters:
      value - the new value
    • getCols

      public int getCols()
      Returns the number of columns in this text area.
      Returns:
      the number of columns in this text area
    • setCols

      public void setCols(String cols)
      Sets the number of columns in this text area.
      Parameters:
      cols - the number of columns in this text area
    • getRows

      public int getRows()
      Returns the number of rows in this text area.
      Returns:
      the number of rows in this text area
    • setRows

      public void setRows(String rows)
      Sets the number of rows in this text area.
      Parameters:
      rows - the number of rows in this text area
    • getDefaultValue

      public String getDefaultValue()
      Returns the textarea's default value, used if the containing form gets reset.
      Returns:
      the textarea's default value, used if the containing form gets reset
      See Also:
    • setDefaultValue

      public void setDefaultValue(String defaultValue)
      Sets the textarea's default value, used if the containing form gets reset.
      Parameters:
      defaultValue - the textarea's default value, used if the containing form gets reset
      See Also:
    • getTextLength

      public int getTextLength()
      Gets the value of textLength attribute.
      Returns:
      the text length
    • getSelectionStart

      public int getSelectionStart()
      Gets the value of selectionStart attribute.
      Returns:
      the selection start
    • setSelectionStart

      public void setSelectionStart(int start)
      Sets the value of selectionStart attribute.
      Parameters:
      start - selection start
    • getSelectionEnd

      public int getSelectionEnd()
      Gets the value of selectionEnd attribute.
      Returns:
      the selection end
    • setSelectionEnd

      public void setSelectionEnd(int end)
      Sets the value of selectionEnd attribute.
      Parameters:
      end - selection end
    • setSelectionRange

      public void setSelectionRange(int start, int end)
      Sets the selected portion of this input element.
      Parameters:
      start - the index of the first character to select
      end - the index of the character after the selection
    • select

      public void select()
      Selects this element.
    • isReadOnly

      public boolean isReadOnly()
      Gets the value of readOnly attribute.
      Returns:
      the readOnly attribute
    • setReadOnly

      public void setReadOnly(boolean readOnly)
      Sets the value of readOnly attribute.
      Parameters:
      readOnly - the new value
    • getMaxLength

      public Object getMaxLength()
      Returns the maximum number of characters in this text area.
      Returns:
      the maximum number of characters in this text area
    • setMaxLength

      public void setMaxLength(String maxLength)
      Sets maximum number of characters in this text area.
      Parameters:
      maxLength - maximum number of characters in this text area.
    • getMinLength

      public Object getMinLength()
      Returns the minimum number of characters in this text area.
      Returns:
      the minimum number of characters in this text area
    • setMinLength

      public void setMinLength(String minLength)
      Sets minimum number of characters in this text area.
      Parameters:
      minLength - minimum number of characters in this text area.
    • getPlaceholder

      public String getPlaceholder()
      Returns the placeholder attribute.
      Returns:
      the placeholder attribute
    • setPlaceholder

      public void setPlaceholder(String placeholder)
      Sets the placeholder attribute.
      Parameters:
      placeholder - the new placeholder value
    • getLabels

      public NodeList getLabels()
      Returns the labels associated with the element.
      Returns:
      the labels associated with the element
    • checkValidity

      public boolean checkValidity()
      Checks whether the element has any constraints and whether it satisfies them.
      Returns:
      if the element is valid
    • isRequired

      public boolean isRequired()
      Returns the required property.
      Returns:
      the required property
    • setRequired

      public void setRequired(boolean required)
      Sets the required property.
      Parameters:
      required - the new value
    • getName

      public String getName()
      Returns the value of the JavaScript attribute name.
      Overrides:
      getName in class HTMLElement
      Returns:
      the value of this attribute
    • setName

      public void setName(String newName)
      Sets the value of the JavaScript attribute name.
      Overrides:
      setName in class HTMLElement
      Parameters:
      newName - the new name
    • isDisabled

      public boolean isDisabled()
      Returns true if this element is disabled. Overridden to modify browser configurations.
      Overrides:
      isDisabled in class HTMLElement
      Returns:
      true if this element is disabled
    • setDisabled

      public void setDisabled(boolean disabled)
      Sets whether or not to disable this element. Overridden to modify browser configurations.
      Overrides:
      setDisabled in class HTMLElement
      Parameters:
      disabled - True if this is to be disabled
    • getForm

      public HTMLFormElement getForm()
      Returns the value of the JavaScript form attribute.
      Overrides:
      getForm in class HTMLElement
      Returns:
      the value of the JavaScript form attribute
    • getWillValidate

      public boolean getWillValidate()
      Returns:
      whether the element is a candidate for constraint validation
    • getValidity

      public ValidityState getValidity()
      Returns:
      a ValidityState with the validity states that this element is in.
    • setCustomValidity

      public void setCustomValidity(String message)
      Sets the custom validity message for the element to the specified message.
      Parameters:
      message - the new message