`include karax / prelude import karax / [vstyles] var myText = "Name will apear here." proc onNameEnter(ev: Event; n: VNode) = if n.value.strip() != "": myText = n.values proc createDom(): VNode = result = buildHtml(tdiv): h1(id = "changeName"): text myText form: label(`for` = "fname"): text "Enter Name:" input(type = "text", id = "fname", name = "fname", onkeyupenter = onNameEnter) setRenderer createDom `
Run