ContentArea extends FormField
A responsive input that resizes to its content, and adheres to explicit sizing. This Element is crucial for the UX of Spreadsheet
Example
new ContentArea({
value: "Initial Value"
})Constructor
new ContentArea(options)
options
:
Object
optionalvalue
:
string
optionalsimilar to input.value
dump
:
function
optionaltransform textContent to value on change
load
:
function
optionaltransform value for input's content
onChange
:
function
optionalevent listener for change, receives (value, valueWas)
Events
| Event | Arguments | Description |
|---|---|---|
change | newValue, oldValue | fired on focusout when value has changed |
Instance Properties
form
The form this element is associated with, if any
The validation message for this element
validity
The ValidityState of this element
Instance Methods
Called when the associated form is reset. Override in subclasses.
Called when the browser restores form state. Override in subclasses.
Parameters
state
:
*
the restored state
mode
:
string
'restore' or 'autocomplete'
Check validity and show browser validation UI if invalid
Returns
boolean
Set the form value for this element
Parameters
value
:
*
the value to submit with the form
Set the validity of this element
Parameters
flags
:
Object
ValidityStateFlags object
message
:
string
optionalvalidation message
anchor
:
HTMLElement
optionalelement to anchor validation UI to