defaultkavy
b3f28dbf86
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()
14 lines
400 B
TypeScript
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))}
|
|
} |