2024-02-01 23:47:13 +08:00
|
|
|
import { $Node } from "./$Node";
|
|
|
|
|
|
|
|
export class $Text extends $Node<Text> {
|
|
|
|
dom: Text;
|
|
|
|
constructor(data: string) {
|
|
|
|
super();
|
|
|
|
this.dom = new Text(data);
|
2024-02-03 09:33:34 +08:00
|
|
|
this.dom.$ = this;
|
2024-02-01 23:47:13 +08:00
|
|
|
}
|
2024-02-03 09:33:34 +08:00
|
|
|
|
|
|
|
content(): string;
|
|
|
|
content(text: string): this;
|
|
|
|
content(text?: string) { return $.fluent(this, arguments, () => this.dom.textContent, () => $.set(this.dom, 'textContent', text))}
|
2024-02-01 23:47:13 +08:00
|
|
|
}
|