From 644f8256db9c7216cfc8a67ba6cb380a96ba28c5 Mon Sep 17 00:00:00 2001 From: bptato Date: Sat, 24 Jun 2023 16:41:13 +0200 Subject: Working Nim-QuickJS GC integration I believe this works correctly. Hopefully I'm not wrong. --- src/html/env.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/html/env.nim') 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() -- cgit 1.4.1-2-gfad0