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.nim4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/html/dom.nim b/src/html/dom.nim
index 4a63b2d0..f2c98bd0 100644
--- a/src/html/dom.nim
+++ b/src/html/dom.nim
@@ -68,6 +68,7 @@ type
     cssvalues_after*: CSSComputedValues
     hover*: bool
     cssapplied*: bool
+    rendered*: bool
 
   HTMLElement* = ref HTMLElementObj
   HTMLElementObj = object of ElementObj
@@ -215,10 +216,11 @@ func newHtmlElement*(tagType: TagType): HTMLElement =
   of TAG_SPAN:
     result = new(HTMLSpanElement)
   else:
-    new(result)
+    result = new(HTMLElement)
 
   result.nodeType = ELEMENT_NODE
   result.tagType = tagType
+  result.cssvalues.rootProperties()
 
 func newDocument*(): Document =
   new(result)