about summary refs log tree commit diff stats
path: root/src/html/env.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-06-24 16:41:13 +0200
committerbptato <nincsnevem662@gmail.com>2023-06-24 18:57:13 +0200
commit644f8256db9c7216cfc8a67ba6cb380a96ba28c5 (patch)
tree8fa210688fece9906a93cdee551f0df838deff19 /src/html/env.nim
parentb10548ed6a1df090cdc7d139ba4ce531ebb1c7ea (diff)
downloadchawan-644f8256db9c7216cfc8a67ba6cb380a96ba28c5.tar.gz
Working Nim-QuickJS GC integration
I believe this works correctly. Hopefully I'm not wrong.
Diffstat (limited to 'src/html/env.nim')
-rw-r--r--src/html/env.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/html/env.nim b/src/html/env.nim
index eba067a8..b3c14fc5 100644
--- a/src/html/env.nim
+++ b/src/html/env.nim
@@ -110,7 +110,7 @@ proc addScripting*(window: Window, selector: Selector[int]) =
   )
   var global = JS_GetGlobalObject(ctx)
   ctx.registerType(Window, asglobal = true)
-  ctx.setOpaque(global, window)
+  ctx.setGlobal(global, window)
   ctx.defineProperty(global, "window", global)
   JS_FreeValue(ctx, global)
   ctx.addDOMExceptionModule()