about summary refs log tree commit diff stats
path: root/src/html
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-07-04 17:01:00 +0200
committerbptato <nincsnevem662@gmail.com>2023-07-04 17:01:00 +0200
commit515bbf076848e238aaf4368db954c7f51cfff481 (patch)
treeb570211ceb94271fdf4ac3dbcdbe2b00df2cc874 /src/html
parent01027f1749c80ce6def8546cb4ee43a5db064c1e (diff)
downloadchawan-515bbf076848e238aaf4368db954c7f51cfff481.tar.gz
dom: add NodeType consts to Node
Diffstat (limited to 'src/html')
-rw-r--r--src/html/dom.nim1
-rw-r--r--src/html/tags.nim1
2 files changed, 1 insertions, 1 deletions
diff --git a/src/html/dom.nim b/src/html/dom.nim
index 4abd683f..820e63f9 100644
--- a/src/html/dom.nim
+++ b/src/html/dom.nim
@@ -3043,6 +3043,7 @@ proc registerElements(ctx: JSContext, nodeCID: JSClassID) =
 proc addDOMModule*(ctx: JSContext) =
   let eventTargetCID = ctx.getClass("EventTarget")
   let nodeCID = ctx.registerType(Node, parent = eventTargetCID)
+  ctx.defineConsts(nodeCID, NodeType, uint16)
   ctx.registerType(NodeList)
   ctx.registerType(HTMLCollection)
   ctx.registerType(Location)
diff --git a/src/html/tags.nim b/src/html/tags.nim
index 9b60ec1f..d12972a0 100644
--- a/src/html/tags.nim
+++ b/src/html/tags.nim
@@ -3,7 +3,6 @@ import strutils
 
 type
   NodeType* = enum
-    UNKNOWN_NODE = 0,
     ELEMENT_NODE = 1,
     ATTRIBUTE_NODE = 2,
     TEXT_NODE = 3,