interface ElementInternals {
    ariaAtomic: null | string;
    ariaAutoComplete: null | string;
    ariaBrailleLabel: null | string;
    ariaBrailleRoleDescription: null | string;
    ariaBusy: null | string;
    ariaChecked: null | string;
    ariaColCount: null | string;
    ariaColIndex: null | string;
    ariaColSpan: null | string;
    ariaCurrent: null | string;
    ariaDescription: null | string;
    ariaDisabled: null | string;
    ariaExpanded: null | string;
    ariaHasPopup: null | string;
    ariaHidden: null | string;
    ariaInvalid: null | string;
    ariaKeyShortcuts: null | string;
    ariaLabel: null | string;
    ariaLevel: null | string;
    ariaLive: null | string;
    ariaModal: null | string;
    ariaMultiLine: null | string;
    ariaMultiSelectable: null | string;
    ariaOrientation: null | string;
    ariaPlaceholder: null | string;
    ariaPosInSet: null | string;
    ariaPressed: null | string;
    ariaReadOnly: null | string;
    ariaRequired: null | string;
    ariaRoleDescription: null | string;
    ariaRowCount: null | string;
    ariaRowIndex: null | string;
    ariaRowSpan: null | string;
    ariaSelected: null | string;
    ariaSetSize: null | string;
    ariaSort: null | string;
    ariaValueMax: null | string;
    ariaValueMin: null | string;
    ariaValueNow: null | string;
    ariaValueText: null | string;
    form: null | HTMLFormElement;
    labels: NodeList;
    role: null | string;
    shadowRoot: null | ShadowRoot;
    states: CustomStateSet;
    validationMessage: string;
    validity: ValidityState;
    willValidate: boolean;
    checkValidity(): boolean;
    reportValidity(): boolean;
    setFormValue(value:
        | null
        | string
        | FormData
        | File, state?:
        | null
        | string
        | FormData
        | File): void;
    setValidity(flags?: ValidityStateFlags, message?: string, anchor?: HTMLElement): void;
}

Hierarchy (view full)

Properties

ariaAtomic: null | string
ariaAutoComplete: null | string
ariaBrailleLabel: null | string
ariaBrailleRoleDescription: null | string
ariaBusy: null | string
ariaChecked: null | string
ariaColCount: null | string
ariaColIndex: null | string
ariaColSpan: null | string
ariaCurrent: null | string
ariaDescription: null | string
ariaDisabled: null | string
ariaExpanded: null | string
ariaHasPopup: null | string
ariaHidden: null | string
ariaInvalid: null | string
ariaKeyShortcuts: null | string
ariaLabel: null | string
ariaLevel: null | string
ariaLive: null | string
ariaModal: null | string
ariaMultiLine: null | string
ariaMultiSelectable: null | string
ariaOrientation: null | string
ariaPlaceholder: null | string
ariaPosInSet: null | string
ariaPressed: null | string
ariaReadOnly: null | string
ariaRequired: null | string
ariaRoleDescription: null | string
ariaRowCount: null | string
ariaRowIndex: null | string
ariaRowSpan: null | string
ariaSelected: null | string
ariaSetSize: null | string
ariaSort: null | string
ariaValueMax: null | string
ariaValueMin: null | string
ariaValueNow: null | string
ariaValueText: null | string
form: null | HTMLFormElement

Returns the form owner of internals's target element.

MDN Reference

labels: NodeList

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

MDN Reference

role: null | string
shadowRoot: null | ShadowRoot

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

MDN Reference

states: CustomStateSet
validationMessage: string

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

MDN Reference

validity: ValidityState

Returns the ValidityState object for internals's target element.

MDN Reference

willValidate: boolean

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

MDN Reference

Methods

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

    MDN Reference

    Returns 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.

    MDN Reference

    Returns boolean

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

    If value is null, the element won't participate in form submission.

    MDN Reference

    Parameters

    • value:
          | null
          | string
          | FormData
          | File
    • Optionalstate:
          | null
          | string
          | FormData
          | File

    Returns void

  • 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.

    MDN Reference

    Parameters

    Returns void