about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-07-21 15:04:16 +0200
committerbptato <nincsnevem662@gmail.com>2024-07-21 15:04:16 +0200
commit814b7b000af414696da6f5d8613fd21a1e104ef4 (patch)
tree21dff3de6d06111da4ac0fc5851e1ca4ab243aff
parent6216aa6733b72fa631546fc6afa591305e45fcf4 (diff)
downloadchawan-814b7b000af414696da6f5d8613fd21a1e104ef4.tar.gz
dom: fix getElementById signature
-rw-r--r--src/html/dom.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/html/dom.nim b/src/html/dom.nim
index d2682efc..43e078a6 100644
--- a/src/html/dom.nim
+++ b/src/html/dom.nim
@@ -2055,11 +2055,11 @@ func findAncestor*(node: Node; tagTypes: set[TagType]): Element =
       return element
   return nil
 
-func getElementById(node: Node; id: string): Element {.jsfunc.} =
+func getElementById(document: Document; id: string): Element {.jsfunc.} =
   if id.len == 0:
     return nil
-  let id = node.document.toAtom(id)
-  for child in node.elements:
+  let id = document.toAtom(id)
+  for child in document.elements:
     if child.id == id:
       return child
   return nil