Interface CustomFormElement

interface CustomFormElement {
    adoptedCallback(): void;
    attributeChangedCallback(
        name: string,
        oldValue: string,
        newValue: string,
    ): void;
    connectedCallback(): void;
    disconnectedCallback(): void;
    formAssociatedCallback(form: HTMLFormElement): void;
    formDisabledCallback(disabled: boolean): void;
    formResetCallback(): void;
    formStateRestoreCallback(
        state: string | File | FormData,
        mode: "autocomplete" | "restore",
    ): void;
}

Hierarchy (View Summary, Expand)

Methods

  • Called when an observed attribute has been added, removed, updated, or replaced. Also called for initial values when an element is created by the parser, or upgraded.

    Note: only attributes listed in static observedAttributes property will receive this callback.

    Parameters

    • name: string
    • oldValue: string
    • newValue: string

    Returns void

  • Called after the disabled state of the element changes, either because the disabled attribute of this element was added or removed; or because the disabled state changed on a <fieldset> that's an ancestor of this element.

    Parameters

    • disabled: boolean

      This parameter represents the new disabled state of the element.

    Returns void

  • Called after the form is reset. The element should reset itself to some kind of default state.

    Returns void

  • Called in one of two circumstances:

    • When the browser restores the state of the element (for example, after a navigation, or when the browser restarts). The mode argument is "restore" in this case.
    • When the browser's input-assist features such as form autofilling sets a value. The mode argument is "autocomplete" in this case.

    Parameters

    • state: string | File | FormData

      The type of this argument depends on how the this.internals.setFormValue() method was called.

    • mode: "autocomplete" | "restore"

    Returns void

MMNEPVFCICPMFPCPTTAAATR