about summary refs log tree commit diff stats
path: root/src/html
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-08-28 22:44:26 +0200
committerbptato <nincsnevem662@gmail.com>2023-08-28 22:44:26 +0200
commit9026c578f637fffee792b4397251f0ca4562caa5 (patch)
treeb25728bc374d6e2f8f6bb9a715ebfa02c286648e /src/html
parent1422f3393301cd6105b3939be194c7c119fcf967 (diff)
downloadchawan-9026c578f637fffee792b4397251f0ca4562caa5.tar.gz
refactor: Result[T, JSError] -> JSResult[T]
Diffstat (limited to 'src/html')
-rw-r--r--src/html/event.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/html/event.nim b/src/html/event.nim
index dd946820..0584b230 100644
--- a/src/html/event.nim
+++ b/src/html/event.nim
@@ -84,7 +84,7 @@ proc innerEventCreationSteps(event: Event, ctx: JSContext,
 
 #TODO eventInitDict type
 proc newEvent(ctx: JSContext, ctype: string, eventInitDict = JS_UNDEFINED):
-    Result[Event, JSError] {.jsctor.} =
+    JSResult[Event] {.jsctor.} =
   if not JS_IsUndefined(eventInitDict) and not JS_IsObject(eventInitDict):
     return err(newTypeError("eventInitDict must be an object"))
   let event = Event()
@@ -149,7 +149,7 @@ func composed(this: Event): bool {.jsfget.} =
 
 # CustomEvent
 proc newCustomEvent(ctx: JSContext, ctype: string,
-    eventInitDict = JS_UNDEFINED): Result[CustomEvent, JSError] {.jsctor.} =
+    eventInitDict = JS_UNDEFINED): JSResult[CustomEvent] {.jsctor.} =
   if not JS_IsUndefined(eventInitDict) and not JS_IsObject(eventInitDict):
     return err(newTypeError("eventInitDict must be an object"))
   let event = CustomEvent()