renamed dom module to 'kdom' to avoid conflicts with Nim's stdlib dom module; it will further diverge from it anyway

This commit is contained in:
Andreas Rumpf 2017-05-29 10:59:59 +02:00
commit c895d18ccb
10 changed files with 12 additions and 11 deletions

View file

@ -1,5 +1,5 @@
import karax, karaxdsl, vdom, dom, components
import karax, karaxdsl, vdom, kdom, components
const
Play = 0

View file

@ -1,7 +1,7 @@
## Example that shows how to accomplish an "infinitely scrolling" app.
include karaxprelude
import jstrutils, dom
import jstrutils, kdom, vstyles
var entries: seq[cstring] = @[]
for i in 1..500:
@ -16,7 +16,8 @@ proc scrollEvent(ev: Event; n: VNode) =
proc createDom(): VNode =
result = buildHtml():
tdiv(onscroll=scrollEvent, style="height: 400px; overflow: scroll"):
tdiv(onscroll=scrollEvent, style=style(
(StyleAttr.height, cstring"400px"), (StyleAttr.overflow, cstring"scroll"))):
for x in entries:
tdiv:
text x