ElementInternals
The ElementInternals
interface of the Document Object Model gives web developers a way to allow custom elements to fully participate in HTML forms.
Properties
The form
read-only property of the ElementInternals interface returns the HTMLFormElement associated with this element.
The labels
read-only property of the ElementInternals interface returns the labels associated with the element.
The shadowRoot
read-only property of the ElementInternals interface returns the ShadowRoot for this element.
The states
read-only property of the ElementInternals interface returns a CustomStateSet representing the possible states of the custom element.
The validationMessage
read-only property of the ElementInternals interface returns the validation message for the element.
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.
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.
Functions
The checkValidity()
method of the ElementInternals interface checks if the element meets any constraint validation rules applied to it.
The reportValidity()
method of the ElementInternals interface checks if the element meets any constraint validation rules applied to it.
The setFormValue()
method of the ElementInternals interface sets the element's submission value and state, communicating these to the user agent.
The setValidity()
method of the ElementInternals interface sets the validity of the element.