defaultkavy
8e37f65f4f
fix: Array.detype() return empty array. new: RouteRecord, Route with path resolve function. change: $ElementManager rename to $NodeManager. add: $Node.hide() and $Node.show(). fix: $Node parent undefined. add: create element with 'label', 'input'. new: $.state() to binding data in element. new: $Form, $Button. fix: Router resolve path id bug
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))}
|
|
} |