ElementInternals extension type

The ElementInternals interface of the Document Object Model gives web developers a way to allow custom elements to fully participate in HTML forms. It provides utilities for working with these elements in the same way you would work with any standard HTML form element, and also exposes the Accessibility Object Model to the element.


API documentation sourced from MDN Web Docs.

on
Implemented types
Available extensions

Properties

ariaAtomic String?
The ariaAtomic property of the ElementInternals interface reflects the value of the aria-atomic attribute, which indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.
getter/setter pair
ariaAutoComplete String?
The ariaAutoComplete property of the ElementInternals interface reflects the value of the aria-autocomplete attribute, which indicates whether inputting text could trigger display of one or more predictions of the user's intended value for a combobox, searchbox, or textbox and specifies how predictions would be presented if they were made.
getter/setter pair
ariaBrailleLabel String?
getter/setter pair
ariaBrailleRoleDescription String?
getter/setter pair
ariaBusy String?
The ariaBusy property of the ElementInternals interface reflects the value of the aria-busy attribute, which indicates whether an element is being modified, as assistive technologies may want to wait until the modifications are complete before exposing them to the user.
getter/setter pair
ariaChecked String?
The ariaChecked property of the ElementInternals interface reflects the value of the aria-checked attribute, which indicates the current "checked" state of checkboxes, radio buttons, and other widgets that have a checked state.
getter/setter pair
ariaColCount String?
The ariaColCount property of the ElementInternals interface reflects the value of the aria-colcount attribute, which defines the number of columns in a table, grid, or treegrid.
getter/setter pair
ariaColIndex String?
The ariaColIndex property of the ElementInternals interface reflects the value of the aria-colindex attribute, which defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.
getter/setter pair
ariaColSpan String?
The ariaColSpan property of the ElementInternals interface reflects the value of the aria-colspan attribute, which defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.
getter/setter pair
ariaCurrent String?
The ariaCurrent property of the ElementInternals interface reflects the value of the aria-current attribute, which indicates the element that represents the current item within a container or set of related elements.
getter/setter pair
ariaDescription String?
The ariaDescription property of the ElementInternals interface reflects the value of the aria-description attribute, which defines a string value that describes or annotates the current element.
getter/setter pair
ariaDisabled String?
The ariaDisabled property of the ElementInternals interface reflects the value of the aria-disabled attribute, which indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
getter/setter pair
ariaExpanded String?
The ariaExpanded property of the ElementInternals interface reflects the value of the aria-expanded attribute, which indicates whether a grouping element owned or controlled by this element is expanded or collapsed.
getter/setter pair
ariaHasPopup String?
The ariaHasPopup property of the ElementInternals interface reflects the value of the aria-haspopup attribute, which indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.
getter/setter pair
ariaHidden String?
The ariaHidden property of the ElementInternals interface reflects the value of the aria-hidden attribute, which indicates whether the element is exposed to an accessibility API.
getter/setter pair
ariaInvalid String?
getter/setter pair
ariaKeyShortcuts String?
The ariaKeyShortcuts property of the ElementInternals interface reflects the value of the aria-keyshortcuts attribute, which indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.
getter/setter pair
ariaLabel String?
}
getter/setter pair
ariaLevel String?
The ariaLevel property of the ElementInternals interface reflects the value of the aria-level attribute, which defines the hierarchical level of an element within a structure.
getter/setter pair
ariaLive String?
The ariaLive property of the ElementInternals interface reflects the value of the aria-live attribute, which indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.
getter/setter pair
ariaModal String?
The ariaModal property of the ElementInternals interface reflects the value of the aria-modal attribute, which indicates whether an element is modal when displayed.
getter/setter pair
ariaMultiLine String?
The ariaMultiLine property of the ElementInternals interface reflects the value of the aria-multiline attribute, which indicates whether a text box accepts multiple lines of input or only a single line.
getter/setter pair
ariaMultiSelectable String?
The ariaMultiSelectable property of the ElementInternals interface reflects the value of the aria-multiselectable attribute, which indicates that the user may select more than one item from the current selectable descendants.
getter/setter pair
ariaOrientation String?
The ariaOrientation property of the ElementInternals interface reflects the value of the aria-orientation attribute, which indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.
getter/setter pair
ariaPlaceholder String?
The ariaPlaceholder property of the ElementInternals interface reflects the value of the aria-placeholder attribute, which defines a short hint intended to aid the user with data entry when the control has no value.
getter/setter pair
ariaPosInSet String?
The ariaPosInSet property of the ElementInternals interface reflects the value of the aria-posinset attribute, which defines an element's number or position in the current set of listitems or treeitems.
getter/setter pair
ariaPressed String?
The ariaPressed property of the ElementInternals interface reflects the value of the aria-pressed attribute, which indicates the current "pressed" state of toggle buttons.
getter/setter pair
ariaReadOnly String?
The ariaReadOnly property of the ElementInternals interface reflects the value of the aria-readonly attribute, which indicates that the element is not editable, but is otherwise operable.
getter/setter pair
ariaRequired String?
The ariaRequired property of the ElementInternals interface reflects the value of the aria-required attribute, which indicates that user input is required on the element before a form may be submitted.
getter/setter pair
ariaRoleDescription String?
The ariaRoleDescription property of the ElementInternals interface reflects the value of the aria-roledescription attribute, which defines a human-readable, author-localized description for the role of an element.
getter/setter pair
ariaRowCount String?
The ariaRowCount property of the ElementInternals interface reflects the value of the aria-rowcount attribute, which defines the total number of rows in a table, grid, or treegrid.
getter/setter pair
ariaRowIndex String?
The ariaRowIndex property of the ElementInternals interface reflects the value of the aria-rowindex attribute, which defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.
getter/setter pair
ariaRowSpan String?
The ariaRowSpan property of the ElementInternals interface reflects the value of the aria-rowspan attribute, which defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.
getter/setter pair
ariaSelected String?
The ariaSelected property of the ElementInternals interface reflects the value of the aria-selected attribute, which indicates the current "selected" state of elements that have a selected state.
getter/setter pair
ariaSetSize String?
The ariaSetSize property of the ElementInternals interface reflects the value of the aria-setsize attribute, which defines the number of items in the current set of listitems or treeitems.
getter/setter pair
ariaSort String?
The ariaSort property of the ElementInternals interface reflects the value of the aria-sort attribute, which indicates if items in a table or grid are sorted in ascending or descending order.
getter/setter pair
ariaValueMax String?
The ariaValueMax property of the ElementInternals interface reflects the value of the aria-valuemax attribute, which defines the maximum allowed value for a range widget.
getter/setter pair
ariaValueMin String?
The ariaValueMin property of the ElementInternals interface reflects the value of the aria-valuemin attribute, which defines the minimum allowed value for a range widget.
getter/setter pair
ariaValueNow String?
The ariaValueNow property of the ElementInternals interface reflects the value of the aria-valuenow attribute, which defines the current value for a range widget.
getter/setter pair
ariaValueText String?
The ariaValueText property of the ElementInternals interface reflects the value of the aria-valuetext attribute, which defines the human-readable text alternative of aria-valuenow for a range widget.
getter/setter pair
form HTMLFormElement?
The form read-only property of the ElementInternals interface returns the HTMLFormElement associated with this element.
no setter
hashCode int
The hash code for this object.
no setterinherited
isDefinedAndNotNull bool

Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension

no setter
isNull bool

Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension

Whether this value corresponds to JavaScript null.
no setter
isTruthy JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of !!this in JavaScript.
no setter
isUndefined bool

Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension

Whether this value corresponds to JavaScript undefined.
no setter
isUndefinedOrNull bool

Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension

no setter
labels NodeList
The labels read-only property of the ElementInternals interface returns the labels associated with the element.
no setter
not JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of !this in JavaScript.
no setter
role String?
The role read-only property of the ElementInternals interface returns the WAI-ARIA role for the element. For example, a checkbox might have role="checkbox".
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shadowRoot ShadowRoot?
The shadowRoot read-only property of the ElementInternals interface returns the ShadowRoot for this element.
no setter
states CustomStateSet
The states read-only property of the ElementInternals interface returns a CustomStateSet representing the possible states of the custom element.
no setter
validationMessage String
The validationMessage read-only property of the ElementInternals interface returns the validation message for the element.
no setter
validity ValidityState
The validity read-only property of the ElementInternals interface returns a ValidityState object which represents the different validity states the element can be in, with respect to constraint validation.
no setter
willValidate bool
The willValidate read-only property of the ElementInternals interface returns true if the element is a submittable element that is a candidate for constraint validation.
no setter

Methods

add(JSAny? any) JSAny

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this + any in JavaScript.
and(JSAny? any) JSAny?

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this && any in JavaScript.
callMethod<R extends JSAny?>(JSAny method, [JSAny? arg1, JSAny? arg2, JSAny? arg3, JSAny? arg4]) → R

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Calls method on this JSObject with up to four arguments.
callMethodVarArgs<R extends JSAny?>(JSAny method, [List<JSAny?>? arguments]) → R

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Calls method on this JSObject with a variable number of arguments.
checkValidity() bool
The checkValidity() method of the ElementInternals interface checks if the element meets any constraint validation rules applied to it.
dartify() Object?

Available on JSAny?, provided by the JSAnyUtilityExtension extension

Converts a JavaScript value to the Dart equivalent if possible.
delete(JSAny property) JSBoolean

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Deletes the property with key property from this JSObject.
divide(JSAny? any) JSAny

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this / any in JavaScript.
equals(JSAny? any) JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this == any in JavaScript.
exponentiate(JSAny? any) JSAny

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this ** any in JavaScript.
getProperty<R extends JSAny?>(JSAny property) → R

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

The value of the property key property of this JSObject.
greaterThan(JSAny? any) JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this > any in JavaScript.
greaterThanOrEqualTo(JSAny? any) JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this >= any in JavaScript.
has(String property) bool

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Shorthand helper for hasProperty to check whether this JSObject contains the property key property, but takes and returns a Dart value.
hasProperty(JSAny property) JSBoolean

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Whether or not this JSObject contains the property key property.
instanceof(JSFunction constructor) bool

Available on JSAny?, provided by the JSAnyUtilityExtension extension

Whether this JSAny? is an instanceof constructor.
instanceOfString(String constructorName) bool

Available on JSAny?, provided by the JSAnyUtilityExtension extension

Whether this JSAny? is an instanceof the constructor that is defined by constructorName, which is looked up in the globalContext.
isA<T extends JSAny?>() bool

Available on JSAny?, provided by the JSAnyUtilityExtension extension

Whether this JSAny? is an instance of the JavaScript type that is declared by T.
lessThan(JSAny? any) JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this < any in JavaScript.
lessThanOrEqualTo(JSAny? any) JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this <= any in JavaScript.
modulo(JSAny? any) JSAny

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this % any in JavaScript.
multiply(JSAny? any) JSAny

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this * any in JavaScript.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notEquals(JSAny? any) JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this != any in JavaScript.
or(JSAny? any) JSAny?

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this || any in JavaScript.
reportValidity() bool
The reportValidity() method of the ElementInternals interface checks if the element meets any constraint validation rules applied to it.
setFormValue(JSAny? value, [JSAny? state]) → void
The setFormValue() method of the ElementInternals interface sets the element's submission value and state, communicating these to the user agent.
setProperty(JSAny property, JSAny? value) → void

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Write the value of property key property of this JSObject.
setValidity([ValidityStateFlags flags, String message, HTMLElement anchor]) → void
The setValidity() method of the ElementInternals interface sets the validity of the element.
strictEquals(JSAny? any) JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this === any in JavaScript.
strictNotEquals(JSAny? any) JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this !== any in JavaScript.
subtract(JSAny? any) JSAny

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this - any in JavaScript.
toString() String
A string representation of this object.
inherited
typeofEquals(String typeString) bool

Available on JSAny?, provided by the JSAnyUtilityExtension extension

Whether the result of typeof on this JSAny? is typeString.
unsignedRightShift(JSAny? any) JSNumber

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this >>> any in JavaScript.

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](String property) JSAny?

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Shorthand helper for getProperty to get the value of the property key property of this JSObject, but takes and returns a Dart value.
operator []=(String property, JSAny? value) → void

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Shorthand helper for setProperty to write the value of the property key property of this JSObject, but takes a Dart value.