diff options
author | bptato <nincsnevem662@gmail.com> | 2023-08-28 22:44:26 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-08-28 22:44:26 +0200 |
commit | 9026c578f637fffee792b4397251f0ca4562caa5 (patch) | |
tree | b25728bc374d6e2f8f6bb9a715ebfa02c286648e /src/html | |
parent | 1422f3393301cd6105b3939be194c7c119fcf967 (diff) | |
download | chawan-9026c578f637fffee792b4397251f0ca4562caa5.tar.gz |
refactor: Result[T, JSError] -> JSResult[T]
Diffstat (limited to 'src/html')
-rw-r--r-- | src/html/event.nim | 4 |
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() |