From e1194507b4f6240cb15c1783240f8a21d359bc16 Mon Sep 17 00:00:00 2001 From: bptato Date: Mon, 13 Dec 2021 11:52:13 +0100 Subject: Support ::before, ::after pseudo elements --- src/html/dom.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/html') 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) -- cgit 1.4.1-2-gfad0