about summary refs log tree commit diff stats
path: root/src/html/env.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2022-12-19 21:03:15 +0100
committerbptato <nincsnevem662@gmail.com>2022-12-19 21:03:15 +0100
commitea9df035a294bf1cfa715c140d0d22aa018e262e (patch)
tree9f1ec79e96003494666970c16f905c0b0c9608ff /src/html/env.nim
parentdad0c1c04b6d4f67da407f69cec98221d178c194 (diff)
downloadchawan-ea9df035a294bf1cfa715c140d0d22aa018e262e.tar.gz
More DOM work
Diffstat (limited to 'src/html/env.nim')
-rw-r--r--src/html/env.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/html/env.nim b/src/html/env.nim
index 6db018c9..29b1de09 100644
--- a/src/html/env.nim
+++ b/src/html/env.nim
@@ -6,6 +6,7 @@ import types/url
 
 proc newWindow*(scripting: bool, loader = none(FileLoader)): Window =
   result = Window(
+    console: console(),
     loader: loader,
     settings: EnvironmentSettings(
       scripting: scripting
@@ -21,6 +22,7 @@ proc newWindow*(scripting: bool, loader = none(FileLoader)): Window =
     ctx.setOpaque(global, result)
     ctx.setProperty(global, "window", global)
     JS_FreeValue(ctx, global)
+    ctx.addconsoleModule()
     ctx.addDOMModule()
     ctx.addURLModule()
     ctx.addHTMLModule()