diff --git a/scene.js b/scene.js index 7ddb838..b740295 100644 --- a/scene.js +++ b/scene.js @@ -1,6 +1,6 @@ window.addEventListener("load", async () => { try { - await Scheme.load_main("scene.wasm", { + hootDom = await Scheme.load_main("scene.wasm", { user_imports: { document: { getElementById(id) { diff --git a/scene.scm b/scene.scm index 4274894..c491841 100644 --- a/scene.scm +++ b/scene.scm @@ -118,9 +118,7 @@ (button (@ (id "button") (type "button") (click ,(lambda (e) - (! counter (1+ (! counter))) - ;; Hacky hack to ensure root-ref isn't GC'd too early... - (display root-ref)))) + (! counter (1+ (! counter)))))) "Counter: " ,counter) (button (@ (click ,(lambda (e) (! counter 0)))) @@ -134,3 +132,5 @@ `(p "I want to see " ,(~ (- 20 (! counter))) " more"))))) (append-child! (document-body) (element-ref-element root-ref)) + +root-ref