update value property of real DOM nodes; minor DOM diff speedups; allow setFocus=false in the DSL

This commit is contained in:
Andreas Rumpf 2017-06-28 15:23:19 +02:00
commit c681f0055f
4 changed files with 67 additions and 38 deletions

View file

@ -54,9 +54,18 @@ type
proc renderComb(self: VComponent): VNode =
let self = Combined(self)
proc bu(ev: Event; n: VNode) =
self.a.value = ""
self.b.value = ""
markDirty(self.a)
markDirty(self.b)
result = buildHtml(tdiv(style=self.style)):
self.a
self.b
button(onclick=bu):
text "reset"
proc changed(self: VComponent): bool =
let self = Combined(self)