about summary refs log tree commit diff stats
path: root/src/html
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-12-28 21:19:21 +0100
committerbptato <nincsnevem662@gmail.com>2023-12-28 21:23:26 +0100
commitd91d1dda2ad1219b3b798eafc14151811ed9a1b3 (patch)
treef82d8da0763f0dbc62dedb2aa9aaa51114d2aad9 /src/html
parentb035e53d641d71fab89f92cd8d5188501be0d058 (diff)
downloadchawan-d91d1dda2ad1219b3b798eafc14151811ed9a1b3.tar.gz
Compile with styleCheck:usages
much better
Diffstat (limited to 'src/html')
-rw-r--r--src/html/chadombuilder.nim2
-rw-r--r--src/html/dom.nim12
2 files changed, 7 insertions, 7 deletions
diff --git a/src/html/chadombuilder.nim b/src/html/chadombuilder.nim
index 2580e608..06d411dc 100644
--- a/src/html/chadombuilder.nim
+++ b/src/html/chadombuilder.nim
@@ -180,7 +180,7 @@ proc newChaDOMBuilder(url: URL, window: Window, isFragment = false):
     finish: finish,
     restart: restart,
     setQuirksMode: setQuirksMode,
-    setCharacterSet: setCharacterset,
+    setCharacterSet: setCharacterSet,
     elementPopped: elementPopped,
     getTemplateContent: getTemplateContent,
     getTagType: getTagType,
diff --git a/src/html/dom.nim b/src/html/dom.nim
index 44613b90..e411c069 100644
--- a/src/html/dom.nim
+++ b/src/html/dom.nim
@@ -223,7 +223,7 @@ type
     checked* {.jsget.}: bool
     xcoord*: int
     ycoord*: int
-    file*: Option[Url]
+    file*: Option[URL]
 
   HTMLAnchorElement* = ref object of HTMLElement
     relList {.jsget.}: DOMTokenList
@@ -2024,7 +2024,7 @@ func href0[T: HTMLAnchorElement|HTMLAreaElement](element: T): string =
 func href(base: HTMLBaseElement): string {.jsfget.} =
   if base.attrb("href"):
     #TODO with fallback base url
-    let url = parseUrl(base.attr("href"))
+    let url = parseURL(base.attr("href"))
     if url.isSome:
       return $url.get
 
@@ -2611,14 +2611,14 @@ proc adopt(document: Document, node: Node) =
 proc resetElement*(element: Element) =
   case element.tagType
   of TAG_INPUT:
-    let input = HTMLInputELement(element)
+    let input = HTMLInputElement(element)
     case input.inputType
     of INPUT_SEARCH, INPUT_TEXT, INPUT_PASSWORD:
       input.value = input.attr("value")
     of INPUT_CHECKBOX, INPUT_RADIO:
       input.checked = input.attrb("checked")
     of INPUT_FILE:
-      input.file = none(Url)
+      input.file = none(URL)
     else: discard
     input.invalid = true
   of TAG_SELECT:
@@ -3123,7 +3123,7 @@ proc prepare*(element: HTMLScriptElement) =
       return
   let cs = getCharset(element.attr("charset"))
   let encoding = if cs != CHARSET_UNKNOWN: cs else: element.document.charset
-  let classicCORS = element.crossorigin
+  let classicCORS = element.crossOrigin
   var options = ScriptOptions(
     nonce: element.internalNonce,
     integrity: element.attr("integrity"),
@@ -3387,7 +3387,7 @@ proc jsReflectGet(ctx: JSContext, this: JSValue, magic: cint): JSValue {.cdecl.}
   of REFLECT_STR:
     let x = toJS(ctx, element.attr(entry.attrname))
     return x
-  of REFLECT_BOOl:
+  of REFLECT_BOOL:
     return toJS(ctx, element.attrb(entry.attrname))
   of REFLECT_LONG:
     return toJS(ctx, element.attrl(entry.attrname).get(entry.i))