diff options
Diffstat (limited to 'src/html')
-rw-r--r-- | src/html/chadombuilder.nim | 3 | ||||
-rw-r--r-- | src/html/dom.nim | 7 | ||||
-rw-r--r-- | src/html/env.nim | 3 | ||||
-rw-r--r-- | src/html/event.nim | 2 |
4 files changed, 11 insertions, 4 deletions
diff --git a/src/html/chadombuilder.nim b/src/html/chadombuilder.nim index da10af20..ad8f7f36 100644 --- a/src/html/chadombuilder.nim +++ b/src/html/chadombuilder.nim @@ -3,6 +3,7 @@ import options import streams import html/dom +import js/error import js/javascript import types/url @@ -204,7 +205,7 @@ proc newDOMParser(): DOMParser {.jsctor.} = new(result) proc parseFromString(ctx: JSContext, parser: DOMParser, str, t: string): - Result[Document, JSError] {.jsfunc.} = + JSResult[Document] {.jsfunc.} = case t of "text/html": let global = JS_GetGlobalObject(ctx) diff --git a/src/html/dom.nim b/src/html/dom.nim index 57b62ec6..6d4b285e 100644 --- a/src/html/dom.nim +++ b/src/html/dom.nim @@ -18,9 +18,12 @@ import img/png import io/loader import io/request import io/window -import js/exception +import js/domexception +import js/error import js/javascript +import js/opaque import js/timeout +import js/tojs import types/blob import types/color import types/matrix @@ -1101,7 +1104,7 @@ const SupportedTokensMap = { }.toTable() func supports(tokenList: DOMTokenList, token: string): - Result[bool, JSError] {.jsfunc.} = + JSResult[bool] {.jsfunc.} = if tokenList.localName in SupportedTokensMap: let lowercase = token.toLowerAscii() return ok(lowercase in SupportedTokensMap[tokenList.localName]) diff --git a/src/html/env.nim b/src/html/env.nim index 82ed163b..0843c1b6 100644 --- a/src/html/env.nim +++ b/src/html/env.nim @@ -10,7 +10,8 @@ import io/promise import io/request import io/response import io/window -import js/exception +import js/domexception +import js/error import js/intl import js/javascript import js/timeout diff --git a/src/html/event.nim b/src/html/event.nim index 433e9597..dd946820 100644 --- a/src/html/event.nim +++ b/src/html/event.nim @@ -2,7 +2,9 @@ import math import times import bindings/quickjs +import js/error import js/javascript +import js/tojs import utils/opt type |