Functions
CreateElement
-
Type parameters
-
K: keyof HTMLElementTagNameMap
Parameters
Returns HTMLElementTagNameMap[K]
CreateImage
-
Parameters
Returns HTMLElementTagNameMap["img"]
chooseColorUsingDefaultInput
- chooseColorUsingDefaultInput(color?: string, onInput?: (value: string) => void): Promise<string>
-
Parameters
-
color: string = "#000000"
-
Optional onInput: (value: string) => void
Returns Promise<string>
createCheckbox
- createCheckbox(label: string, onChange: (checked: boolean) => void, checked?: boolean): HTMLLabelElement
-
Parameters
-
label: string
-
onChange: (checked: boolean) => void
-
checked: boolean = false
Returns HTMLLabelElement
dragElement
- dragElement(element: HTMLElement, headerSelector?: string): { clear: any }
-
Parameters
-
element: HTMLElement
-
headerSelector: string = ".header"
Returns { clear: any }
elementToString
- elementToString(element: HTMLElement): string
-
Parameters
Returns string
getOrCreate
- getOrCreate<K>(parent: HTMLElement, type: K, ...classes: string[]): HTMLElementTagNameMap[K]
-
Type parameters
-
K: keyof HTMLElementTagNameMap
Parameters
-
parent: HTMLElement
-
type: K
-
Rest ...classes: string[]
Returns HTMLElementTagNameMap[K]
getOrCreateAndAppend
- getOrCreateAndAppend<K>(parent: HTMLElement, type: K, ...classes: string[]): HTMLElementTagNameMap[K]
-
Type parameters
-
K: keyof HTMLElementTagNameMap
Parameters
-
parent: HTMLElement
-
type: K
-
Rest ...classes: string[]
Returns HTMLElementTagNameMap[K]
TODO: element remains after deletion onMessage screen