How do I add HTML elements at runtime? I am aware of the following example
[https://github.com/pragmagic/karax#event-model
](https://github.com/pragmagic/karax#event-model) but I can not convert the
example to anything else but a kstring. Manipulating the code ends in failure.
What if I wanted
You need to use the `VNode` data type in the seq. This is a working example:
include karax / prelude
var elements: seq[VNode] = @[]
proc createDom(): VNode =
result = buildHtml(tdiv):
button:
text "Say hello!"
proc onclick(ev: Event;
Thank you @jyapayne. It seems very simple now that I see code that works.