elexis/lib/node/$Text.ts
defaultkavy b3f28dbf86 v0.0.7
change: Router.open(), .replace() .back(), .events change to static
add: $.open(), $.replace(), $.back()
add: $.html() convert html string to $Element
update: $State support output format
update: $Util.from() convert children node to $Element
change: $Node.parent change to getter
change: using $StateArgument<T>
new: $SVGElement, $HTMLElement
new: $AsyncNode
add: $Image.load()
2024-04-23 18:18:43 +08:00

14 lines
400 B
TypeScript

import { $Node } from "./$Node";
export class $Text extends $Node<Text> {
dom: Text;
constructor(data: string) {
super();
this.dom = new Text(data);
this.dom.$ = this;
}
content(): string;
content(text: string): this;
content(text?: string) { return $.fluent(this, arguments, () => this.dom.textContent, () => $.set(this.dom, 'textContent', text))}
}