Formatting
This commit is contained in:
parent
626c486bc5
commit
6fe3824bda
1 changed files with 12 additions and 11 deletions
23
scene.scm
23
scene.scm
|
@ -112,16 +112,17 @@
|
||||||
(define square (~ (* (! counter) (! counter))))
|
(define square (~ (* (! counter) (! counter))))
|
||||||
|
|
||||||
(define root-ref
|
(define root-ref
|
||||||
(sxml->dom-ref `(div (@ (class "foo"))
|
(sxml->dom-ref
|
||||||
(p "this is a test")
|
`(div (@ (class "foo"))
|
||||||
(button (@ (id "button")
|
(p "this is a test")
|
||||||
(type "button")
|
(button (@ (id "button")
|
||||||
(click ,(lambda (e)
|
(type "button")
|
||||||
(! counter (1+ (! counter)))
|
(click ,(lambda (e)
|
||||||
;; Hacky hack to ensure root-ref isn't GC'd too early...
|
(! counter (1+ (! counter)))
|
||||||
(display root-ref))))
|
;; Hacky hack to ensure root-ref isn't GC'd too early...
|
||||||
"Counter: "
|
(display root-ref))))
|
||||||
,counter)
|
"Counter: "
|
||||||
(p "The square is: " ,square))))
|
,counter)
|
||||||
|
(p "The square is: " ,square))))
|
||||||
|
|
||||||
(append-child! (document-body) (element-ref-element root-ref))
|
(append-child! (document-body) (element-ref-element root-ref))
|
||||||
|
|
Loading…
Reference in a new issue