cleanup dom's PR

This commit is contained in:
Araq 2018-05-24 00:01:01 +02:00
commit 9882d1aec2

View file

@ -4,7 +4,8 @@ import kdom, vdom, jstrutils, compact, jdict, vstyles
export kdom.Event, kdom.Blob export kdom.Event, kdom.Blob
{.experimental: "notnil".} when defined(nimNoNil):
{.experimental: "notnil".}
proc kout*[T](x: T) {.importc: "console.log", varargs, deprecated.} proc kout*[T](x: T) {.importc: "console.log", varargs, deprecated.}
## the preferred way of debugging karax applications. Now deprecated, ## the preferred way of debugging karax applications. Now deprecated,
@ -140,6 +141,7 @@ proc vnodeToDom*(n: VNode; kxi: KaraxInstance): Node =
elif n.kind == VNodeKind.verbatim: elif n.kind == VNodeKind.verbatim:
result = document.createElement("div") result = document.createElement("div")
result.innerHTML = n.text result.innerHTML = n.text
attach n
return result return result
elif n.kind == VNodeKind.vthunk: elif n.kind == VNodeKind.vthunk:
let x = callThunk(vcomponents[n.text], n) let x = callThunk(vcomponents[n.text], n)