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-07 19:30:55 +0200
committerbptato <nincsnevem662@gmail.com>2023-06-07 19:30:55 +0200
commit578df008d0e2e6ac2d8ee2ad84ccf640f8d07c55 (patch)
tree216e69d75300e241508194b3ed61221e98c5f1c6 /src/html/env.nim
parent724f196225b5351724f0018b2fc78d744891fb17 (diff)
downloadchawan-578df008d0e2e6ac2d8ee2ad84ccf640f8d07c55.tar.gz
Add support for width, height media query
Diffstat (limited to 'src/html/env.nim')
-rw-r--r--src/html/env.nim4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/html/env.nim b/src/html/env.nim
index 8b558b8a..ca7e497d 100644
--- a/src/html/env.nim
+++ b/src/html/env.nim
@@ -6,6 +6,7 @@ import html/htmlparser
 import io/loader
 import io/promise
 import io/request
+import io/window
 import js/intl
 import js/javascript
 import js/timeout
@@ -124,8 +125,9 @@ proc runJSJobs*(window: Window) =
   window.jsrt.runJSJobs(window.console.err)
 
 proc newWindow*(scripting: bool, selector: Selector[int],
-    loader = none(FileLoader)): Window =
+    attrs: WindowAttributes, loader = none(FileLoader)): Window =
   let window = Window(
+    attrs: attrs,
     console: console(err: newFileStream(stderr)),
     navigator: Navigator(),
     loader: loader,