-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCustomElement.d.ts
More file actions
29 lines (21 loc) · 1.16 KB
/
CustomElement.d.ts
File metadata and controls
29 lines (21 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/** Base class for a custom element. */
export declare class CustomElement extends HTMLElement {
/** List of attributes to observe for changes, invoking `attributeChangedCallback`. */
static observedAttributes?: string[]
/** Indicates whether the custom element participates in form submission. */
static formAssociated?: boolean
/** Called when one of the element's observed attributes changes. */
attributeChangedCallback?(name: string, oldValue: string | null, newValue: string | null): void
/** Called when the element is added to a document. */
connectedCallback?(): void
/** Called when the element is removed from a document. */
disconnectedCallback?(): void
/** Called when the element is associated or disassociated with a form. */
formAssociatedCallback?(form: HTMLFormElement | null): void
/** Called when the disabled state of the element changes. */
formDisabledCallback?(isDisabled: boolean): void
/** Called when the associated form is reset. */
formResetCallback?(): void
/** Called when the browser automatically fills out the element. */
formStateRestoreCallback?(state: string | File | FormData, reason: "autocomplete" | "restore"): void
}