stateful components now in a workable state; renamed .component macro to .compact which much better captures its meaning

This commit is contained in:
Andreas Rumpf 2017-06-20 00:14:54 +02:00
commit c86916e37d
10 changed files with 185 additions and 291 deletions

View file

@ -1,5 +1,5 @@
import karax, karaxdsl, vdom, kdom, components
import karax, karaxdsl, vdom, kdom, compact
const
Play = 0
@ -12,7 +12,7 @@ proc play(n: Node) {.importcpp.}
proc pause(n: Node) {.importcpp.}
proc `width=`(n: Node, w: int) {.importcpp: "#.width = #".}
proc mplayer*(id, resource: cstring): VNode {.component.} =
proc mplayer*(id, resource: cstring): VNode {.compact.} =
proc handler(ev: Event; n: VNode) =
let myVideo = document.getElementById(id)
case n.key