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
This commit is contained in:
2025-09-13 19:44:55 -04:00
parent af2e0d2eec
commit 96c8f980e9
19 changed files with 732 additions and 101 deletions

View File

@@ -1,10 +1,14 @@
export interface FluentDomObject {
(nodeOrQuerySelector: string | HTMLElement): FluentDomObject;
(nodeOrQuerySelector: HTMLElement | string): FluentDomObject;
fluentDom: string;
a: (name: string, value: string) => FluentDomObject;
app: (obj: FluentDomObject | HTMLElement | string) => FluentDomObject;
append: (obj: FluentDomObject | HTMLElement | string) => FluentDomObject;
app: (
...content: (FluentDomObject | HTMLElement | string)[]
) => FluentDomObject;
append: (
...content: (FluentDomObject | HTMLElement | string)[]
) => FluentDomObject;
attr: (name: string, value: string) => FluentDomObject;
c: (tagName: string) => FluentDomObject;
@@ -34,6 +38,13 @@ export interface 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);