diff options
-rw-r--r-- | src/html/dom.nim | 6 |
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 |