diff options
author | bptato <nincsnevem662@gmail.com> | 2023-09-07 16:52:49 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-09-07 16:52:49 +0200 |
commit | 62d78f3ca867b159d699d9580805c7c88e76bded (patch) | |
tree | c6371ba1784fe73078a25cd1278ce116c020898b /src/html | |
parent | c63e86558f56a6498b9989e01b896dc18a9e3384 (diff) | |
download | chawan-62d78f3ca867b159d699d9580805c7c88e76bded.tar.gz |
twtstr: remove toLowerAscii2
Diffstat (limited to 'src/html')
-rw-r--r-- | src/html/dom.nim | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/html/dom.nim b/src/html/dom.nim index 6e2e2a04..0f9cb3ef 100644 --- a/src/html/dom.nim +++ b/src/html/dom.nim @@ -1323,8 +1323,9 @@ func findAttrNS(map: NamedNodeMap, namespace, localName: string): int = return -1 func hasAttribute(element: Element, qualifiedName: string): bool {.jsfunc.} = - let qualifiedName = if element.namespace == Namespace.HTML and not element.document.isxml: - qualifiedName.toLowerAscii2() + let qualifiedName = if element.namespace == Namespace.HTML and + not element.document.isxml: + qualifiedName.toLowerAscii() else: qualifiedName if qualifiedName in element.attrs: @@ -1334,8 +1335,9 @@ func hasAttributeNS(element: Element, namespace, localName: string): bool {.jsfu return element.attributes.findAttrNS(namespace, localName) != -1 func getAttribute(element: Element, qualifiedName: string): Option[string] {.jsfunc.} = - let qualifiedName = if element.namespace == Namespace.HTML and not element.document.isxml: - qualifiedName.toLowerAscii2() + let qualifiedName = if element.namespace == Namespace.HTML and + not element.document.isxml: + qualifiedName.toLowerAscii() else: qualifiedName element.attrs.withValue(qualifiedName, val): @@ -2190,7 +2192,7 @@ proc setAttribute(element: Element, qualifiedName, value: string): Err[DOMException] {.jsfunc.} = ?validateAttributeName(qualifiedName) let qualifiedName = if element.namespace == Namespace.HTML and not element.document.isxml: - qualifiedName.toLowerAscii2() + qualifiedName.toLowerAscii() else: qualifiedName element.attr(qualifiedName, value) @@ -2217,7 +2219,7 @@ proc setAttributeNS(element: Element, namespace, qualifiedName, proc removeAttribute(element: Element, qualifiedName: string) {.jsfunc.} = let qualifiedName = if element.namespace == Namespace.HTML and not element.document.isxml: - qualifiedName.toLowerAscii2() + qualifiedName.toLowerAscii() else: qualifiedName element.delAttr(qualifiedName) @@ -2231,7 +2233,7 @@ proc toggleAttribute(element: Element, qualifiedName: string, force = none(bool)): DOMResult[bool] {.jsfunc.} = ?validateAttributeName(qualifiedName) let qualifiedName = if element.namespace == Namespace.HTML and not element.document.isxml: - qualifiedName.toLowerAscii2() + qualifiedName.toLowerAscii() else: qualifiedName if not element.attrb(qualifiedName): @@ -2819,7 +2821,7 @@ proc createElement(document: Document, localName: string): return err(newDOMException("Invalid character in element name", "InvalidCharacterError")) let localName = if not document.isxml: - localName.toLowerAscii2() + localName.toLowerAscii() else: localName let namespace = if not document.isxml: #TODO or content type is application/xhtml+xml |