about summary refs log tree commit diff stats
path: root/src/xhr/formdata.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-08-28 22:33:31 +0200
committerbptato <nincsnevem662@gmail.com>2023-08-28 22:38:00 +0200
commit1422f3393301cd6105b3939be194c7c119fcf967 (patch)
tree32969f2af8fe5293c13215a84229915a7970e828 /src/xhr/formdata.nim
parentba2a62f6d3a2879c9506ea3fb5aa5552fc4674d9 (diff)
downloadchawan-1422f3393301cd6105b3939be194c7c119fcf967.tar.gz
javascript: refactor
Split out parts of the JS module, because it was starting to confuse
the compiler a little.

(Peakmem is back at 750M. Interesting.)
Diffstat (limited to 'src/xhr/formdata.nim')
-rw-r--r--src/xhr/formdata.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/xhr/formdata.nim b/src/xhr/formdata.nim
index e69b9bf7..57af59bf 100644
--- a/src/xhr/formdata.nim
+++ b/src/xhr/formdata.nim
@@ -1,6 +1,7 @@
 import html/dom
-import js/exception
+import js/domexception
 import js/javascript
+import js/tojs
 import types/blob
 import types/formdata
 import utils/twtstr
@@ -14,7 +15,7 @@ proc newFormData0*(): FormData =
   return FormData()
 
 proc newFormData*(form: HTMLFormElement = nil,
-    submitter: HTMLElement = nil): Result[FormData, JSError] {.jsctor.} =
+    submitter: HTMLElement = nil): DOMResult[FormData] {.jsctor.} =
   let this = FormData()
   if form != nil:
     if submitter != nil: