about summary refs log tree commit diff stats
path: root/src/types
diff options
context:
space:
mode:
Diffstat (limited to 'src/types')
-rw-r--r--src/types/blob.nim3
-rw-r--r--src/types/cookie.nim2
-rw-r--r--src/types/formdata.nim3
-rw-r--r--src/types/url.nim3
4 files changed, 11 insertions, 0 deletions
diff --git a/src/types/blob.nim b/src/types/blob.nim
index d72d0505..505e4f7c 100644
--- a/src/types/blob.nim
+++ b/src/types/blob.nim
@@ -19,6 +19,9 @@ type
     path*: string
     file: File #TODO maybe use fd?
 
+jsDestructor(Blob)
+jsDestructor(WebFile)
+
 proc newBlob*(buffer: pointer, size: int, ctype: string,
     deallocFun: DeallocFun): Blob =
   return Blob(
diff --git a/src/types/cookie.nim b/src/types/cookie.nim
index c6b526ee..7418963d 100644
--- a/src/types/cookie.nim
+++ b/src/types/cookie.nim
@@ -25,6 +25,8 @@ type
     filter*: URLFilter
     cookies*: seq[Cookie]
 
+jsDestructor(Cookie)
+
 proc parseCookieDate(val: string): Option[DateTime] =
   # cookie-date
   const Delimiters = {'\t', ' '..'/', ';'..'@', '['..'`', '{'..'~'}
diff --git a/src/types/formdata.nim b/src/types/formdata.nim
index 983508bf..2bc26e22 100644
--- a/src/types/formdata.nim
+++ b/src/types/formdata.nim
@@ -1,3 +1,4 @@
+import js/javascript
 import types/blob
 
 type
@@ -13,6 +14,8 @@ type
   FormData* = ref object
     entries*: seq[FormDataEntry]
 
+jsDestructor(FormData)
+
 iterator items*(this: FormData): FormDataEntry {.inline.} =
   for entry in this.entries:
     yield entry
diff --git a/src/types/url.nim b/src/types/url.nim
index 968e642c..3eb6889c 100644
--- a/src/types/url.nim
+++ b/src/types/url.nim
@@ -60,6 +60,9 @@ type
     domain: Option[string]
   ]]
 
+jsDestructor(URL)
+jsDestructor(URLSearchParams)
+
 const EmptyPath = UrlPath(opaque: true, s: "")
 const EmptyHost = Host(domain: "").some