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:
parent
d6c7be7106
commit
c895d18ccb
10 changed files with 12 additions and 11 deletions
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
import karax, karaxdsl, vdom, dom, components
|
||||
import karax, karaxdsl, vdom, kdom, components
|
||||
|
||||
const
|
||||
Play = 0
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue