about summary refs log tree commit diff stats
path: root/src/html
diff options
context:
space:
mode:
Diffstat (limited to 'src/html')
-rw-r--r--src/html/chadombuilder.nim1
-rw-r--r--src/html/dom.nim3
-rw-r--r--src/html/event.nim1
3 files changed, 4 insertions, 1 deletions
diff --git a/src/html/chadombuilder.nim b/src/html/chadombuilder.nim
index ad8f7f36..5ccc7ee2 100644
--- a/src/html/chadombuilder.nim
+++ b/src/html/chadombuilder.nim
@@ -4,6 +4,7 @@ import streams
 
 import html/dom
 import js/error
+import js/fromjs
 import js/javascript
 import types/url
 
diff --git a/src/html/dom.nim b/src/html/dom.nim
index c0b60728..617ec404 100644
--- a/src/html/dom.nim
+++ b/src/html/dom.nim
@@ -20,6 +20,7 @@ import io/request
 import io/window
 import js/domexception
 import js/error
+import js/fromjs
 import js/javascript
 import js/opaque
 import js/timeout
@@ -2943,7 +2944,7 @@ proc jsReflectSet(ctx: JSContext, this, val: JSValue, magic: cint): JSValue {.cd
     return JS_ThrowTypeError(ctx, "Invalid tag type %s", element.tagType)
   case entry.t
   of REFLECT_STR:
-    let x = toString(ctx, val)
+    let x = fromJS[string](ctx, val)
     if x.isSome:
       element.attr(entry.attrname, x.get)
   of REFLECT_BOOL:
diff --git a/src/html/event.nim b/src/html/event.nim
index 0584b230..5f841fd1 100644
--- a/src/html/event.nim
+++ b/src/html/event.nim
@@ -3,6 +3,7 @@ import times
 
 import bindings/quickjs
 import js/error
+import js/fromjs
 import js/javascript
 import js/tojs
 import utils/opt