• Public
  • Public/Protected
  • All

Interface CustomFormElement




Optional adoptedCallback

  • adoptedCallback(): void

Optional attributeChangedCallback

  • attributeChangedCallback(name: string, oldValue: string, newValue: string): void
  • 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.


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

    Returns void

Optional connectedCallback

  • connectedCallback(): void

Optional disconnectedCallback

  • disconnectedCallback(): void

Optional formAssociatedCallback

  • Called when the browser associates the element with a form element, or disassociates the element from a form element.


    Returns void

Optional formDisabledCallback

  • formDisabledCallback(disabled: boolean): 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.


    • disabled: boolean

      This parameter represents the new disabled state of the element.

    Returns void

Optional formResetCallback

  • formResetCallback(): void
  • Called after the form is reset. The element should reset itself to some kind of default state.

    Returns void

Optional formStateRestoreCallback

  • formStateRestoreCallback(state: string | File | FormData, mode: "restore" | "autocomplete"): 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.


    • state: string | File | FormData

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

    • mode: "restore" | "autocomplete"

    Returns void

Generated using TypeDoc