Chartbreaker
    Preparing search index...

    Interface ElementInternals

    The ElementInternals interface of the Document Object Model gives web developers a way to allow custom elements to fully participate in HTML forms.

    MDN Reference

    interface ElementInternals {
        ariaActiveDescendantElement: null | Element;
        ariaAtomic: null | string;
        ariaAutoComplete: null | string;
        ariaBrailleLabel: null | string;
        ariaBrailleRoleDescription: null | string;
        ariaBusy: null | string;
        ariaChecked: null | string;
        ariaColCount: null | string;
        ariaColIndex: null | string;
        ariaColIndexText: null | string;
        ariaColSpan: null | string;
        ariaControlsElements: null | readonly Element[];
        ariaCurrent: null | string;
        ariaDescribedByElements: null | readonly Element[];
        ariaDescription: null | string;
        ariaDetailsElements: null | readonly Element[];
        ariaDisabled: null | string;
        ariaErrorMessageElements: null | readonly Element[];
        ariaExpanded: null | string;
        ariaFlowToElements: null | readonly Element[];
        ariaHasPopup: null | string;
        ariaHidden: null | string;
        ariaInvalid: null | string;
        ariaKeyShortcuts: null | string;
        ariaLabel: null | string;
        ariaLabelledByElements: null | readonly Element[];
        ariaLevel: null | string;
        ariaLive: null | string;
        ariaModal: null | string;
        ariaMultiLine: null | string;
        ariaMultiSelectable: null | string;
        ariaOrientation: null | string;
        ariaOwnsElements: null | readonly Element[];
        ariaPlaceholder: null | string;
        ariaPosInSet: null | string;
        ariaPressed: null | string;
        ariaReadOnly: null | string;
        ariaRelevant: null | string;
        ariaRequired: null | string;
        ariaRoleDescription: null | string;
        ariaRowCount: null | string;
        ariaRowIndex: null | string;
        ariaRowIndexText: 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 | File | FormData,
            state?: null | string | File | FormData,
        ): void;
        setValidity(
            flags?: ValidityStateFlags,
            message?: string,
            anchor?: HTMLElement,
        ): void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    ariaActiveDescendantElement: null | Element
    ariaAtomic: null | string
    ariaAutoComplete: null | string
    ariaBrailleLabel: null | string
    ariaBrailleRoleDescription: null | string
    ariaBusy: null | string
    ariaChecked: null | string
    ariaColCount: null | string
    ariaColIndex: null | string
    ariaColIndexText: null | string
    ariaColSpan: null | string
    ariaControlsElements: null | readonly Element[]
    ariaCurrent: null | string
    ariaDescribedByElements: null | readonly Element[]
    ariaDescription: null | string
    ariaDetailsElements: null | readonly Element[]
    ariaDisabled: null | string
    ariaErrorMessageElements: null | readonly Element[]
    ariaExpanded: null | string
    ariaFlowToElements: null | readonly Element[]
    ariaHasPopup: null | string
    ariaHidden: null | string
    ariaInvalid: null | string
    ariaKeyShortcuts: null | string
    ariaLabel: null | string
    ariaLabelledByElements: null | readonly Element[]
    ariaLevel: null | string
    ariaLive: null | string
    ariaModal: null | string
    ariaMultiLine: null | string
    ariaMultiSelectable: null | string
    ariaOrientation: null | string
    ariaOwnsElements: null | readonly Element[]
    ariaPlaceholder: null | string
    ariaPosInSet: null | string
    ariaPressed: null | string
    ariaReadOnly: null | string
    ariaRelevant: null | string
    ariaRequired: null | string
    ariaRoleDescription: null | string
    ariaRowCount: null | string
    ariaRowIndex: null | string
    ariaRowIndexText: 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

    The form read-only property of the ElementInternals interface returns the HTMLFormElement associated with this element.

    MDN Reference

    labels: NodeList

    The labels read-only property of the ElementInternals interface returns the labels associated with the element.

    MDN Reference

    role: null | string
    shadowRoot: null | ShadowRoot

    The shadowRoot read-only property of the ElementInternals interface returns the ShadowRoot for this element.

    MDN Reference

    states: CustomStateSet

    The states read-only property of the ElementInternals interface returns a CustomStateSet representing the possible states of the custom element.

    MDN Reference

    validationMessage: string

    The validationMessage read-only property of the ElementInternals interface returns the validation message for the element.

    MDN Reference

    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.

    MDN Reference

    willValidate: boolean

    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.

    MDN Reference

    Methods

    • The checkValidity() method of the ElementInternals interface checks if the element meets any constraint validation rules applied to it.

      MDN Reference

      Returns boolean

    • The reportValidity() method of the ElementInternals interface checks if the element meets any constraint validation rules applied to it.

      MDN Reference

      Returns boolean

    • The setFormValue() method of the ElementInternals interface sets the element's submission value and state, communicating these to the user agent.

      MDN Reference

      Parameters

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

      Returns void