defaultkavy
4c078c26b6
- remove: class $EventMethod, $Event. - change: $EventManager rewrite logic. - change: most $Node base node element generic type have new EM(EventMap) parameter. - new: $EventTarget. - change: $Node extends $EventTarget. - change: mix dom events and $EventManager events into $EventTarget.on().off().once(). - fix: $Container.insert() process synchronous when passing an not async function - new: $Window element. - fix: $(document.documentElement) throw error. - new: $KeyboardManager, $FocusManager, $PointerManager. - new: $ global methods: - $.events() return new $EventManager. - $.pointers() return new $PointerManager. - $.keys() return new $KeyboardManager. - $.focus() return new $FocusManager. - $.call() - change: $Media extends $HTMLElement - change: $Anchor.href() support $State parameter. - new: $State.convert()
67 lines
3.3 KiB
TypeScript
67 lines
3.3 KiB
TypeScript
import { $Element, $ElementEventMap, $ElementOptions } from "./$Element";
|
|
|
|
export interface $HTMLElementOptions extends $ElementOptions {}
|
|
export class $HTMLElement<H extends HTMLElement = HTMLElement, $EM extends $HTMLElementEventMap = $HTMLElementEventMap> extends $Element<H, $EM> {
|
|
constructor(tagname: string, options?: $HTMLElementOptions) {
|
|
super(tagname, options)
|
|
}
|
|
|
|
autocapitalize(): Autocapitalize;
|
|
autocapitalize(autocapitalize?: Autocapitalize): this;
|
|
autocapitalize(autocapitalize?: Autocapitalize) { return $.fluent(this, arguments, () => this.dom.autocapitalize, () => $.set(this.dom, 'autocapitalize', autocapitalize as any))}
|
|
|
|
innerText(): string;
|
|
innerText(text?: string): this;
|
|
innerText(text?: string) { return $.fluent(this, arguments, () => this.dom.innerText, () => $.set(this.dom, 'innerText', text as any))}
|
|
|
|
title(): string;
|
|
title(title?: string): this;
|
|
title(title?: string) { return $.fluent(this, arguments, () => this.dom.title, () => $.set(this.dom, 'title', title as any))}
|
|
|
|
dir(): TextDirection;
|
|
dir(dir?: TextDirection): this;
|
|
dir(dir?: TextDirection) { return $.fluent(this, arguments, () => this.dom.dir, () => $.set(this.dom, 'dir', dir as any))}
|
|
|
|
translate(): boolean;
|
|
translate(translate?: boolean): this;
|
|
translate(translate?: boolean) { return $.fluent(this, arguments, () => this.dom.translate, () => $.set(this.dom, 'translate', translate as any))}
|
|
|
|
popover(): string | null;
|
|
popover(popover?: string | null): this;
|
|
popover(popover?: string | null) { return $.fluent(this, arguments, () => this.dom.popover, () => $.set(this.dom, 'popover', popover as any))}
|
|
|
|
spellcheck(): boolean;
|
|
spellcheck(spellcheck?: boolean): this;
|
|
spellcheck(spellcheck?: boolean) { return $.fluent(this, arguments, () => this.dom.spellcheck, () => $.set(this.dom, 'spellcheck', spellcheck as any))}
|
|
|
|
inert(): boolean;
|
|
inert(inert?: boolean): this;
|
|
inert(inert?: boolean) { return $.fluent(this, arguments, () => this.dom.inert, () => $.set(this.dom, 'inert', inert as any))}
|
|
|
|
lang(): string;
|
|
lang(lang?: string): this;
|
|
lang(lang?: string) { return $.fluent(this, arguments, () => this.dom.lang, () => $.set(this.dom, 'lang', lang as any))}
|
|
|
|
draggable(): boolean;
|
|
draggable(draggable?: boolean): this;
|
|
draggable(draggable?: boolean) { return $.fluent(this, arguments, () => this.dom.draggable, () => $.set(this.dom, 'draggable', draggable as any))}
|
|
|
|
hidden(): boolean;
|
|
hidden(hidden?: boolean): this;
|
|
hidden(hidden?: boolean) { return $.fluent(this, arguments, () => this.dom.hidden, () => $.set(this.dom, 'hidden', hidden as any))}
|
|
|
|
click() { this.dom.click(); return this; }
|
|
attachInternals() { return this.dom.attachInternals(); }
|
|
hidePopover() { this.dom.hidePopover(); return this; }
|
|
showPopover() { this.dom.showPopover(); return this; }
|
|
togglePopover() { this.dom.togglePopover(); return this; }
|
|
|
|
get accessKeyLabel() { return this.dom.accessKeyLabel }
|
|
get offsetHeight() { return this.dom.offsetHeight }
|
|
get offsetLeft() { return this.dom.offsetLeft }
|
|
get offsetParent() { return $(this.dom.offsetParent) }
|
|
get offsetTop() { return this.dom.offsetTop }
|
|
get offsetWidth() { return this.dom.offsetWidth }
|
|
}
|
|
|
|
export interface $HTMLElementEventMap extends $ElementEventMap {} |