import { djbase, djclass } from "@implab/djx/declare"; import { DjxWidgetBase } from "@implab/djx/tsx/DjxWidgetBase"; import { createElement, watch, prop, attach, all, bind, toggleClass } from "@implab/djx/tsx"; import ProgressBar from "./ProgressBar"; import Button = require("dijit/form/Button"); import { interval } from "rxjs"; @djclass export default class MainWidget extends djbase(DjxWidgetBase) { titleNode?: HTMLHeadingElement; progressBar?: ProgressBar; count = 0; showCounter = false; counterNode?: HTMLInputElement; paused = false; render() { const Counter = ({ children }: { children: unknown[] }) => Counter: {children}; return

Hi!

{watch(prop(this, "showCounter"), flag => flag && [ x*10) .map(String) ), attach(this, "counterNode") )} /> ms, " | ", , " | ",
; } postCreate(): void { super.postCreate(); const h = setInterval( () => { this.set("count", this.count + 1); }, 10 ); this.own({ destroy: () => { clearInterval(h); } }); } private _onPauseClick = () => { this.set("paused", !this.paused); } private _onToggleCounterClick = () => { this.set("showCounter", !this.showCounter); } }