Called each time the element is moved to a new document.
Called when attributes are changed, added, removed, or replaced. See Responding to attribute changes for more details about this callback.
The name of the attribute which changed
The attribute's old value.
The attribute's new value.
Called each time the element is added to the document. The specification recommends that, as far as possible, developers should implement custom element setup in this callback rather than the constructor.
When defined, this is called instead of () and () each time the element is moved to a different place in the DOM via (). Use this to avoid running initialization/cleanup code in the () and () callbacks when the element is not actually being added to or removed from the DOM. See Lifecycle callbacks and state-preserving moves for more details.
Called each time the element is removed from the document.
Called when the browser associates the element with a form element, or disassociates the element from a form element.
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
Called after the form is reset. The element should reset itself to some kind of default state. For elements, this usually involves setting the value property to match the value attribute set in markup (or in the case of a checkbox, setting the checked property to match the checked attribute.
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 auto filling sets a value. The mode argument is "autocomplete" in this case.
The type of the first argument depends on how the setFormValue() method was called. For more details, see Restoring form state.
Lifecycle callbacks A map, whose keys are the strings "connectedCallback", "disconnectedCallback", "adoptedCallback", "attributeChangedCallback", "formAssociatedCallback", "formDisabledCallback", "formResetCallback", and "formStateRestoreCallback" https://html.spec.whatwg.org/multipage/custom-elements.html#concept-custom-element-definition-lifecycle-callbacks
A form-associated custom element API includes a set of extra lifecycle callbacks to tie in to the form lifecycle. The callbacks are optional: only implement a callback if your element needs to do something at that point in the lifecycle. https://html.spec.whatwg.org/multipage/custom-elements.html#the-elementinternals-interface https://docs.google.com/document/d/1JO8puctCSpW-ZYGU8lF-h4FWRIDQNDVexzHoOQ2iQmY/edit