about summary refs log tree commit diff stats
path: root/src/html/dom.nim
diff options
context:
space:
mode:
Diffstat (limited to 'src/html/dom.nim')
-rw-r--r--src/html/dom.nim5
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