diff options
author | bptato <nincsnevem662@gmail.com> | 2023-05-21 13:28:33 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-05-21 13:28:33 +0200 |
commit | d09319640c4b1e24b937d1fc37a3f8b82052e612 (patch) | |
tree | 45631e7ed2c23ce4a4217bfe2037cba2ba873231 /src/html | |
parent | 7c612d65be345fd1ef156f95bb033d9bbf8aece8 (diff) | |
download | chawan-d09319640c4b1e24b937d1fc37a3f8b82052e612.tar.gz |
Rewrite new Request binding
Still far from perfect, but now at least it has a bit more to do with what the standard mandates.
Diffstat (limited to 'src/html')
-rw-r--r-- | src/html/dom.nim | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/html/dom.nim b/src/html/dom.nim index 7dbe39f1..fef66e2d 100644 --- a/src/html/dom.nim +++ b/src/html/dom.nim @@ -128,7 +128,7 @@ type localName: string Node* = ref object of EventTarget - nodeType* {.jsget.}: NodeType + nodeType*: NodeType childList*: seq[Node] parentNode* {.jsget.}: Node parentElement* {.jsget.}: Element @@ -565,6 +565,9 @@ func newCollection[T: Collection](root: Node, match: proc(node: Node): bool {.no inc root.document.colln result.populateCollection() +func nodeType(node: Node): uint16 {.jsfget.} = + return uint16(node.nodeType) + func isElement(node: Node): bool = return node.nodeType == ELEMENT_NODE |