about summary refs log tree commit diff stats
path: root/src/html/env.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-08-23 23:50:14 +0200
committerbptato <nincsnevem662@gmail.com>2023-08-23 23:52:05 +0200
commite50186dd1112e24cbf74acda0ea2bd4c63ee2ed9 (patch)
tree756fc3b3a749716b5f188696b03820b0d529936d /src/html/env.nim
parent65fe1de341be4c6f8a7f1a0ec6d954be463bba29 (diff)
downloadchawan-e50186dd1112e24cbf74acda0ea2bd4c63ee2ed9.tar.gz
dom: add some null checks for window
Now that we have established that window *can* be nil.
(Though the document.location window null check is probably
unnecessary, because it is only called from scripts... but better
safe than sorry.)
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 c38852d5..6e81e614 100644
--- a/src/html/env.nim
+++ b/src/html/env.nim
@@ -89,7 +89,7 @@ proc screenTop(window: Window): int64 {.jsfget.} = 0
 #TODO outerWidth, outerHeight
 proc devicePixelRatio(window: Window): float64 {.jsfget.} = 1
 
-proc setLocation(window: Window, s: string): Err[DOMException]
+proc setLocation(window: Window, s: string): Err[JSError]
     {.jsfset: "location".} =
   window.document.setLocation(s)