ElementInternals

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var ariaInvalid: String?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Returns the form owner of internals's target element.

Link copied to clipboard

Returns a NodeList of all the label elements that internals's target element is associated with.

Link copied to clipboard
open var role: String?
Link copied to clipboard

Returns the ShadowRoot for internals's target element, if the target element is a shadow host, or null otherwise.

Link copied to clipboard
Link copied to clipboard
open override val validationMessage: String

Returns the error message that would be shown to the user if internals's target element was to be checked for validity.

Link copied to clipboard
open override val validity: ValidityState

Returns the ValidityState object for internals's target element.

Link copied to clipboard
open override val willValidate: Boolean

Returns true if internals's target element will be validated when the form is submitted; false otherwise.

Functions

Link copied to clipboard
open override fun checkValidity(): Boolean

Returns true if internals's target element has no validity problems; false otherwise. Fires an invalid event at the element in the latter case.

Link copied to clipboard
open override fun reportValidity(): Boolean

Returns true if internals's target element has no validity problems; otherwise, returns false, fires an invalid event at the element, and (if the event isn't canceled) reports the problem to the user.

Link copied to clipboard
fun setFormValue(value: String?, state: String? = definedExternally)
fun setFormValue(value: FormData?, state: FormData? = definedExternally)

fun setFormValue(value: File?, state: File? = definedExternally)

Sets both the state and submission value of internals's target element to value.

Link copied to clipboard
fun setValidity(flags: ValidityStateFlags = definedExternally, message: String = definedExternally, anchor: HTMLElement = definedExternally)

Marks internals's target element as suffering from the constraints indicated by the flags argument, and sets the element's validation message to message. If anchor is specified, the user agent might use it to indicate problems with the constraints of internals's target element when the form owner is validated interactively or reportValidity() is called.