Trilium Frontend API
    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. 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.

    MDN Reference

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

    Hierarchy (View Summary)

    Index

    Properties

    ariaActiveDescendantElement: Element
    ariaAtomic: string
    ariaAutoComplete: string
    ariaBrailleLabel: string
    ariaBrailleRoleDescription: string
    ariaBusy: string
    ariaChecked: string
    ariaColCount: string
    ariaColIndex: string
    ariaColIndexText: string
    ariaColSpan: string
    ariaControlsElements: readonly Element[]
    ariaCurrent: string
    ariaDescribedByElements: readonly Element[]
    ariaDescription: string
    ariaDetailsElements: readonly Element[]
    ariaDisabled: string
    ariaErrorMessageElements: readonly Element[]
    ariaExpanded: string
    ariaFlowToElements: readonly Element[]
    ariaHasPopup: string
    ariaHidden: string
    ariaInvalid: string
    ariaKeyShortcuts: string
    ariaLabel: string
    ariaLabelledByElements: readonly Element[]
    ariaLevel: string
    ariaLive: string
    ariaModal: string
    ariaMultiLine: string
    ariaMultiSelectable: string
    ariaOrientation: string
    ariaOwnsElements: readonly Element[]
    ariaPlaceholder: string
    ariaPosInSet: string
    ariaPressed: string
    ariaReadOnly: string
    ariaRelevant: string
    ariaRequired: string
    ariaRoleDescription: string
    ariaRowCount: string
    ariaRowIndex: string
    ariaRowIndexText: string
    ariaRowSpan: string
    ariaSelected: string
    ariaSetSize: string
    ariaSort: string
    ariaValueMax: string
    ariaValueMin: string
    ariaValueNow: string
    ariaValueText: string

    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: string
    shadowRoot: ShadowRoot

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

    MDN Reference

    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: string | File | FormData
      • Optionalstate: string | File | FormData

      Returns void

    • The setValidity() method of the ElementInternals interface sets the validity of the element.

      MDN Reference

      Parameters

      Returns void