about summary refs log tree commit diff stats
path: root/src/html
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/html
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/html')
-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 5883dabf..a70508be 100644
--- a/src/html/env.nim
+++ b/src/html/env.nim
@@ -8,6 +8,7 @@ import io/promise
 import io/request
 import io/response
 import io/window
+import js/exception
 import js/intl
 import js/javascript
 import js/timeout
@@ -112,6 +113,7 @@ proc addScripting*(window: Window, selector: Selector[int]) =
   ctx.setOpaque(global, window)
   ctx.defineProperty(global, "window", global)
   JS_FreeValue(ctx, global)
+  ctx.addDOMExceptionModule()
   ctx.addconsoleModule()
   ctx.addNavigatorModule()
   ctx.addDOMModule()