about summary refs log tree commit diff stats
path: root/src/html
diff options
context:
space:
mode:
Diffstat (limited to 'src/html')
-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)
='#n101'>101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169