about summary refs log tree commit diff stats
path: root/src/display/client.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-06-19 18:13:10 +0200
committerbptato <nincsnevem662@gmail.com>2023-06-19 18:15:09 +0200
commit17097052794aef56bbc55327d3e6c84ae1c67378 (patch)
tree13b81e1105c07c69d7a8d1e7367a698f41663a01 /src/display/client.nim
parente372bdaa0344b23c91aefa4da44c578fbf8f49e2 (diff)
downloadchawan-17097052794aef56bbc55327d3e6c84ae1c67378.tar.gz
Rework JS exception system
Now we use Result for passing exceptions to JS. As a result, we can
finally get rid of the .jserr pragma.
Diffstat (limited to 'src/display/client.nim')
-rw-r--r--src/display/client.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/display/client.nim b/src/display/client.nim
index 88185fb7..8196df26 100644
--- a/src/display/client.nim
+++ b/src/display/client.nim
@@ -31,6 +31,7 @@ import ips/forkserver
 import ips/serialize
 import ips/serversocket
 import ips/socketstream
+import js/exception
 import js/intl
 import js/javascript
 import js/module
@@ -39,6 +40,7 @@ import types/blob
 import types/cookie
 import types/dispatcher
 import types/url
+import utils/opt
 import xhr/formdata as formdata_impl
 
 type
@@ -544,6 +546,7 @@ proc newClient*(config: Config, dispatcher: Dispatcher): Client =
 
   ctx.registerType(Console)
 
+  ctx.addDOMExceptionModule()
   ctx.addCookieModule()
   ctx.addURLModule()
   ctx.addDOMModule()