about summary refs log tree commit diff stats
path: root/src/js
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-06-08 08:03:16 +0200
committerbptato <nincsnevem662@gmail.com>2023-06-08 08:03:16 +0200
commit00d7836d8a3d0101bd282e3acce58d65ed0220fe (patch)
tree70ff6f736277ab277bf527b4e3b79771bb7e3935 /src/js
parent23339918fa58f570a2b12bc7c7e78d4d8681b9a2 (diff)
downloadchawan-00d7836d8a3d0101bd282e3acce58d65ed0220fe.tar.gz
Remove JSObject again, add File API constructor
Diffstat (limited to 'src/js')
-rw-r--r--src/js/intl.nim2
-rw-r--r--src/js/javascript.nim6
2 files changed, 1 insertions, 7 deletions
diff --git a/src/js/intl.nim b/src/js/intl.nim
index 28cc42d5..f37789ad 100644
--- a/src/js/intl.nim
+++ b/src/js/intl.nim
@@ -8,7 +8,7 @@ type
 
 #TODO ...yeah
 proc newNumberFormat(name: string = "en-US",
-    options = none(JSObject)): NumberFormat {.jsctor.} =
+    options = none(JSValue)): NumberFormat {.jsctor.} =
   return NumberFormat()
 
 #TODO: this should accept string/BigInt too
diff --git a/src/js/javascript.nim b/src/js/javascript.nim
index 4eefd1b6..17bc555a 100644
--- a/src/js/javascript.nim
+++ b/src/js/javascript.nim
@@ -85,10 +85,6 @@ type
 
   JSFunctionList* = openArray[JSCFunctionListEntry]
 
-  JSObject* = object
-    ctx*: JSContext
-    val*: JSValue
-
 func getOpaque*(ctx: JSContext): JSContextOpaque =
   return cast[JSContextOpaque](JS_GetContextOpaque(ctx))
 
@@ -703,8 +699,6 @@ proc fromJS*[T](ctx: JSContext, val: JSValue): Option[T] =
       return none(T)
   elif T is JSValue:
     return some(val)
-  elif T is JSObject:
-    return some(JSObject(ctx: ctx, val: val))
   elif T is object:
     doAssert false, "Dictionary case has not been implemented yet!"
     #TODO TODO TODO implement dictionary case