Class HTMLTextAreaElement
- java.lang.Object
-
- org.htmlunit.corejs.javascript.ScriptableObject
-
- org.htmlunit.javascript.HtmlUnitScriptable
-
- org.htmlunit.javascript.host.event.EventTarget
-
- org.htmlunit.javascript.host.dom.Node
-
- org.htmlunit.javascript.host.Element
-
- org.htmlunit.javascript.host.html.HTMLElement
-
- org.htmlunit.javascript.host.html.HTMLTextAreaElement
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.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 objectHTMLTextAreaElement.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.htmlunit.javascript.host.html.HTMLElement
HTMLElement.ProxyDomNode
-
-
Field Summary
Fields Modifier and Type Field Description private NodeListlabels_"Live" labels collection; has to be a member to have equality (==) working.-
Fields inherited from class org.htmlunit.javascript.host.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
-
-
Constructor Summary
Constructors Constructor Description HTMLTextAreaElement()Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckValidity()Checks whether the element has any constraints and whether it satisfies them.intgetCols()Returns the number of columns in this text area.java.lang.StringgetDefaultValue()Returns the textarea's default value, used if the containing form gets reset.HtmlTextAreagetDomNodeOrDie()Returns the DOM node that corresponds to this JavaScript object or throw an exception if one cannot be found.HTMLFormElementgetForm()Returns the value of the JavaScriptformattribute.NodeListgetLabels()Returns the labels associated with the element.java.lang.ObjectgetMaxLength()Returns the maximum number of characters in this text area.java.lang.ObjectgetMinLength()Returns the minimum number of characters in this text area.java.lang.StringgetName()Returns the value of the JavaScript attributename.java.lang.StringgetPlaceholder()Returns theplaceholderattribute.intgetRows()Returns the number of rows in this text area.intgetSelectionEnd()Gets the value ofselectionEndattribute.intgetSelectionStart()Gets the value ofselectionStartattribute.intgetTextLength()Gets the value oftextLengthattribute.java.lang.StringgetType()Returns the type of this input.ValidityStategetValidity()java.lang.StringgetValue()Returns the value of thevalueattribute.booleangetWillValidate()booleanisDisabled()Returns true if this element is disabled.booleanisReadOnly()Gets the value ofreadOnlyattribute.booleanisRequired()Returns therequiredproperty.voidjsConstructor()JavaScript constructor.voidselect()Selects this element.voidsetCols(java.lang.String cols)Sets the number of columns in this text area.voidsetCustomValidity(java.lang.String message)Sets the custom validity message for the element to the specified message.voidsetDefaultValue(java.lang.String defaultValue)Sets the textarea's default value, used if the containing form gets reset.voidsetDisabled(boolean disabled)Sets whether or not to disable this element.voidsetMaxLength(java.lang.String maxLength)Sets maximum number of characters in this text area.voidsetMinLength(java.lang.String minLength)Sets minimum number of characters in this text area.voidsetName(java.lang.String newName)Sets the value of the JavaScript attributename.voidsetPlaceholder(java.lang.String placeholder)Sets theplaceholderattribute.voidsetReadOnly(boolean readOnly)Sets the value ofreadOnlyattribute.voidsetRequired(boolean required)Sets therequiredproperty.voidsetRows(java.lang.String rows)Sets the number of rows in this text area.voidsetSelectionEnd(int end)Sets the value ofselectionEndattribute.voidsetSelectionRange(int start, int end)Sets the selected portion of this input element.voidsetSelectionStart(int start)Sets the value ofselectionStartattribute.voidsetValue(java.lang.Object value)Sets the value of thevalueattribute.-
Methods inherited from class org.htmlunit.javascript.host.html.HTMLElement
blur, click, focus, getAccessKey, getAlign, getAttributeNode, getAutofocus, getBoundingClientRect, getCh, getChOff, getContentEditable, getDataset, getDir, getDomNodeOrNull, getEnterKeyHint, getInnerText, getLang, getLocalName, getNodeName, getOffsetHeight, getOffsetLeft, getOffsetParent_js, getOffsetTop, getOffsetWidth, getOnabort, getOnanimationcancel, getOnanimationend, getOnanimationiteration, getOnanimationstart, getOnauxclick, getOnblur, getOncancel, getOncanplay, getOncanplaythrough, getOnchange, getOnclick, getOnclose, getOncontextmenu, getOncopy, getOncuechange, getOncut, getOndblclick, getOndrag, getOndragend, getOndragenter, getOndragleave, getOndragover, getOndragstart, getOndrop, getOndurationchange, getOnemptied, getOnended, getOnerror, getOnfocus, getOngotpointercapture, getOninput, getOninvalid, getOnkeydown, getOnkeypress, getOnkeyup, getOnload, getOnloadeddata, getOnloadedmetadata, getOnloadstart, getOnlostpointercapture, getOnmousedown, getOnmouseenter, getOnmouseleave, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnmousewheel, getOnmozfullscreenchange, getOnmozfullscreenerror, getOnpaste, getOnpause, getOnplay, getOnplaying, getOnpointercancel, getOnpointerdown, getOnpointerenter, getOnpointerleave, getOnpointermove, getOnpointerout, getOnpointerover, getOnpointerup, getOnprogress, getOnratechange, getOnreset, getOnresize, getOnscroll, getOnscrollend, getOnseeked, getOnseeking, getOnselect, getOnselectionchange, getOnselectstart, getOnstalled, getOnsubmit, getOnsuspend, getOntimeupdate, getOntoggle, getOntransitioncancel, getOntransitionend, getOntransitionrun, getOntransitionstart, getOnvolumechange, getOnwaiting, getOnwheel, getOuterText, getParentHTMLElement, getPosX, getPosY, getPrefix, getStyle, getTabIndex, getTitle, getVAlign, getWidthOrHeight, isAncestorOfEventTarget, isEndTagForbidden, isHidden, isIsContentEditable, isLowerCaseInOuterHtml, isSpellcheck, setAccessKey, setAlign, setAttribute, setAutofocus, setCh, setChOff, setColorAttribute, setContentEditable, setDir, setDomNode, setEnterKeyHint, setHidden, setInnerText, setLang, setOnabort, setOnanimationcancel, setOnanimationend, setOnanimationiteration, setOnanimationstart, setOnauxclick, setOnblur, setOncancel, setOncanplay, setOncanplaythrough, setOnchange, setOnclick, setOnclose, setOncontextmenu, setOncopy, setOncuechange, setOncut, setOndblclick, setOndrag, setOndragend, setOndragenter, setOndragleave, setOndragover, setOndragstart, setOndrop, setOndurationchange, setOnemptied, setOnended, setOnerror, setOnfocus, setOngotpointercapture, setOninput, setOninvalid, setOnkeydown, setOnkeypress, setOnkeyup, setOnload, setOnloadeddata, setOnloadedmetadata, setOnloadstart, setOnlostpointercapture, setOnmousedown, setOnmouseenter, setOnmouseleave, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnmousewheel, setOnmozfullscreenchange, setOnmozfullscreenerror, setOnpaste, setOnpause, setOnplay, setOnplaying, setOnpointercancel, setOnpointerdown, setOnpointerenter, setOnpointerleave, setOnpointermove, setOnpointerout, setOnpointerover, setOnpointerup, setOnprogress, setOnratechange, setOnreset, setOnresize, setOnscroll, setOnscrollend, setOnseeked, setOnseeking, setOnselect, setOnselectionchange, setOnselectstart, setOnstalled, setOnsubmit, setOnsuspend, setOntimeupdate, setOntoggle, setOntransitioncancel, setOntransitionend, setOntransitionrun, setOntransitionstart, setOnvolumechange, setOnwaiting, setOnwheel, setOuterText, setSpellcheck, setStyle, setTabIndex, setTextContent, setTitle, setVAlign, setWidthOrHeight, toString
-
Methods inherited from class org.htmlunit.javascript.host.Element
after, append, before, closest, createAttributesObject, createEventHandler, getAttribute, getAttributeNodeNS, getAttributeNS, getAttributes, getChildElementCount, getChildren, getClassList, getClassName_js, getClientHeight, getClientLeft, getClientRects, getClientTop, getClientWidth, getElementsByClassName, getElementsByTagName, getElementsByTagNameNS, getFirstElementChild, getId, getInnerHTML, getInnerHTML, getLastElementChild, getNamespaceURI, getNextElementSibling, getOnbeforecopy, getOnbeforecut, getOnbeforepaste, getOnsearch, getOnwebkitfullscreenchange, getOnwebkitfullscreenerror, getOuterHTML, getParentElement, getPreviousElementSibling, getScrollHeight, getScrollLeft, getScrollTop, getScrollWidth, getTagName, hasAttribute, hasAttributeNS, hasAttributes, innerHTML, insertAdjacentElement, insertAdjacentHTML, insertAdjacentText, isDisplayNone, matches, mozMatchesSelector, prepend, printChildren, printNode, querySelector, querySelectorAll, releaseCapture, remove, removeAttribute, removeAttributeNode, removeAttributeNS, replaceChildren, replaceWith, scroll, scrollBy, scrollIntoView, scrollIntoViewIfNeeded, scrollTo, setAttributeNode, setAttributeNS, setCapture, setClassName_js, setId, setInnerHTML, setOnbeforecopy, setOnbeforecut, setOnbeforepaste, setOnsearch, setOnwebkitfullscreenchange, setOnwebkitfullscreenerror, setOuterHTML, setScrollLeft, setScrollTop, toggleAttribute, webkitMatchesSelector
-
Methods inherited from class org.htmlunit.javascript.host.dom.Node
after, append, appendChild, before, cloneNode, compareDocumentPosition, contains, getBaseURI, getChildNodes, getFirstChild, getJavaScriptNode, getLastChild, getNextSibling, getNodeType, getNodeValue, getOwnerDocument, getParent, getParentNode, getPreviousSibling, getRootNode, getTextContent, hasChildNodes, insertBefore, insertBeforeImpl, isEqualNode, isSameNode, normalize, prepend, removeChild, replaceChild, replaceChildren, replaceWith, setNodeValue
-
Methods inherited from class org.htmlunit.javascript.host.event.EventTarget
addEventListener, clearEventListenersContainer, dispatchEvent, executeEventLocally, fireEvent, getEventHandler, getEventListenersContainer, hasEventHandlers, isEventHandlerOnWindow, removeEventListener, setEventHandler
-
Methods inherited from class org.htmlunit.javascript.HtmlUnitScriptable
clone, equivalentValues, get, getBrowserVersion, getClassName, getDefaultValue, getPrototype, getScriptableFor, getStartingScope, getWindow, getWindow, getWithPreemption, has, hasInstance, initParentScope, makeScriptableFor, put, setClassName, setDomNode, setParentScope, setupPromise, setupRejectedPromise
-
Methods inherited from class org.htmlunit.corejs.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setPrototype, size
-
-
-
-
Field Detail
-
labels_
private NodeList labels_
"Live" labels collection; has to be a member to have equality (==) working.
-
-
Method Detail
-
jsConstructor
public void jsConstructor()
JavaScript constructor.- Overrides:
jsConstructorin classHTMLElement
-
getType
public java.lang.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:
getDomNodeOrDiein classHTMLElement- Returns:
- the DOM node
-
getValue
public java.lang.String getValue()
Returns the value of thevalueattribute.- Overrides:
getValuein classHTMLElement- Returns:
- the value of the
valueattribute
-
setValue
public void setValue(java.lang.Object value)
Sets the value of thevalueattribute.- Overrides:
setValuein classHTMLElement- 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(java.lang.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(java.lang.String rows)
Sets the number of rows in this text area.- Parameters:
rows- the number of rows in this text area
-
getDefaultValue
public java.lang.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:
- MSDN Documentation
-
setDefaultValue
public void setDefaultValue(java.lang.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:
- MSDN Documentation
-
getTextLength
public int getTextLength()
Gets the value oftextLengthattribute.- Returns:
- the text length
-
getSelectionStart
public int getSelectionStart()
Gets the value ofselectionStartattribute.- Returns:
- the selection start
-
setSelectionStart
public void setSelectionStart(int start)
Sets the value ofselectionStartattribute.- Parameters:
start- selection start
-
getSelectionEnd
public int getSelectionEnd()
Gets the value ofselectionEndattribute.- Returns:
- the selection end
-
setSelectionEnd
public void setSelectionEnd(int end)
Sets the value ofselectionEndattribute.- 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 selectend- the index of the character after the selection
-
select
public void select()
Selects this element.
-
isReadOnly
public boolean isReadOnly()
Gets the value ofreadOnlyattribute.- Returns:
- the readOnly attribute
-
setReadOnly
public void setReadOnly(boolean readOnly)
Sets the value ofreadOnlyattribute.- Parameters:
readOnly- the new value
-
getMaxLength
public java.lang.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(java.lang.String maxLength)
Sets maximum number of characters in this text area.- Parameters:
maxLength- maximum number of characters in this text area.
-
getMinLength
public java.lang.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(java.lang.String minLength)
Sets minimum number of characters in this text area.- Parameters:
minLength- minimum number of characters in this text area.
-
getPlaceholder
public java.lang.String getPlaceholder()
Returns theplaceholderattribute.- Returns:
- the
placeholderattribute
-
setPlaceholder
public void setPlaceholder(java.lang.String placeholder)
Sets theplaceholderattribute.- Parameters:
placeholder- the newplaceholdervalue
-
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 therequiredproperty.- Returns:
- the
requiredproperty
-
setRequired
public void setRequired(boolean required)
Sets therequiredproperty.- Parameters:
required- the new value
-
getName
public java.lang.String getName()
Returns the value of the JavaScript attributename.- Overrides:
getNamein classHTMLElement- Returns:
- the value of this attribute
-
setName
public void setName(java.lang.String newName)
Sets the value of the JavaScript attributename.- Overrides:
setNamein classHTMLElement- Parameters:
newName- the new name
-
isDisabled
public boolean isDisabled()
Returns true if this element is disabled. Overridden to modify browser configurations.- Overrides:
isDisabledin classHTMLElement- 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:
setDisabledin classHTMLElement- Parameters:
disabled- True if this is to be disabled
-
getForm
public HTMLFormElement getForm()
Returns the value of the JavaScriptformattribute.- Overrides:
getFormin classHTMLElement- Returns:
- the value of the JavaScript
formattribute
-
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(java.lang.String message)
Sets the custom validity message for the element to the specified message.- Parameters:
message- the new message
-
-