about summary refs log tree commit diff stats
path: root/src/html
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2021-12-13 11:52:13 +0100
committerbptato <nincsnevem662@gmail.com>2021-12-13 11:59:54 +0100
commite1194507b4f6240cb15c1783240f8a21d359bc16 (patch)
tree0076a000e8a00cb3605ef8b275bdcc66e9768d51 /src/html
parente46f0a4cb9b6a843e900dbb3abd5ce9684f47016 (diff)
downloadchawan-e1194507b4f6240cb15c1783240f8a21d359bc16.tar.gz
Support ::before, ::after pseudo elements
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)