Files
fluent-dom-esm/src/fluent-dom-esm.types.ts
Eric Woodward 96c8f980e9 update to v2.3.0
add `.rep()` & `.replaceChildren()` function
update `.app()` & `.append()` to support rest params
update build target to ES6
fix comment color on demo page
add (more) tests
2025-09-13 19:44:55 -04:00

70 lines
2.2 KiB
TypeScript

export interface FluentDomObject {
(nodeOrQuerySelector: HTMLElement | string): FluentDomObject;
fluentDom: string;
a: (name: string, value: string) => FluentDomObject;
app: (
...content: (FluentDomObject | HTMLElement | string)[]
) => FluentDomObject;
append: (
...content: (FluentDomObject | HTMLElement | string)[]
) => FluentDomObject;
attr: (name: string, value: string) => FluentDomObject;
c: (tagName: string) => FluentDomObject;
className: (className: string) => FluentDomObject;
clear: () => FluentDomObject;
clr: () => FluentDomObject;
cls: (className: string) => FluentDomObject;
create: (tagName: string) => FluentDomObject;
h: (url: string) => FluentDomObject;
href: (url: string) => FluentDomObject;
html: (content: string) => FluentDomObject;
id: (id: string) => FluentDomObject;
l: (
type: keyof HTMLElementEventMap,
listener: () => {},
optionsOrUseCapture?: boolean | object,
) => FluentDomObject;
listen: (
type: keyof HTMLElementEventMap,
listener: () => {},
optionsOrUseCapture?: boolean | object,
) => FluentDomObject;
q: (selector: string) => FluentDomObject;
querySelector: (selector: string) => FluentDomObject;
rep: (
...content: (FluentDomObject | HTMLElement | string)[]
) => FluentDomObject;
replaceChildren: (
...content: (FluentDomObject | HTMLElement | string)[]
) => FluentDomObject;
s:
| ((prop: CSSStyleDeclaration) => FluentDomObject)
| ((prop: string, value: string) => FluentDomObject);
style:
| ((prop: CSSStyleDeclaration) => FluentDomObject)
| ((prop: string, value: string) => FluentDomObject);
t: (text: string) => FluentDomObject;
text: (text: string) => FluentDomObject;
title: (title: string) => FluentDomObject;
toDom: () => HTMLElement | null;
toHTMLElement: () => HTMLElement | null;
unlisten: (
type: keyof HTMLElementEventMap,
listener: () => {},
optionsOrUseCapture?: boolean | object,
) => FluentDomObject;
v: () => string;
version: () => string;
}