diff options
author | bptato <nincsnevem662@gmail.com> | 2023-06-24 16:41:13 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-06-24 18:57:13 +0200 |
commit | 644f8256db9c7216cfc8a67ba6cb380a96ba28c5 (patch) | |
tree | 8fa210688fece9906a93cdee551f0df838deff19 /src/display/client.nim | |
parent | b10548ed6a1df090cdc7d139ba4ce531ebb1c7ea (diff) | |
download | chawan-644f8256db9c7216cfc8a67ba6cb380a96ba28c5.tar.gz |
Working Nim-QuickJS GC integration
I believe this works correctly. Hopefully I'm not wrong.
Diffstat (limited to 'src/display/client.nim')
-rw-r--r-- | src/display/client.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/display/client.nim b/src/display/client.nim index ff8aacf3..81d400b1 100644 --- a/src/display/client.nim +++ b/src/display/client.nim @@ -59,6 +59,7 @@ type pager {.jsget.}: Pager line {.jsget.}: LineEdit config {.jsget.}: Config + store {.jsget, jsset.}: URL jsrt: JSRuntime jsctx: JSContext fdmap: Table[int, Container] @@ -549,7 +550,7 @@ proc newClient*(config: Config, dispatcher: Dispatcher): Client = result.pager = newPager(config, result.attrs, dispatcher, ctx) var global = JS_GetGlobalObject(ctx) ctx.registerType(Client, asglobal = true) - setOpaque(ctx, global, result) + setGlobal(ctx, global, result) ctx.setProperty(global, "client", global) JS_FreeValue(ctx, global) |