about summary refs log tree commit diff stats
path: root/src/html
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2022-07-27 22:28:14 +0200
committerbptato <nincsnevem662@gmail.com>2022-07-27 23:26:24 +0200
commitdd9cb39c7d6adfa02feb181dd629bb9a93b7250c (patch)
tree4d4f840847a20577729f12a879c95c7a29a859b7 /src/html
parentcc92092fe8053f77d0c63e57c3990272b36be4ef (diff)
downloadchawan-dd9cb39c7d6adfa02feb181dd629bb9a93b7250c.tar.gz
Fix StyledNode invalidation & others
Diffstat (limited to 'src/html')
-rw-r--r--src/html/dom.nim7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/html/dom.nim b/src/html/dom.nim
index 98ed023b..2c6b9134 100644
--- a/src/html/dom.nim
+++ b/src/html/dom.nim
@@ -84,8 +84,7 @@ type
     classList*: seq[string]
     attributes*: Table[string, string]
     hover*: bool
-    cssapplied*: bool
-    rendered*: bool
+    invalid*: bool
 
   HTMLElement* = ref object of Element
 
@@ -778,7 +777,7 @@ proc resetElement*(element: Element) =
     of INPUT_FILE:
       input.file = none(Url)
     else: discard
-    input.rendered = false
+    input.invalid = true
   of TAG_SELECT:
     let select = HTMLSelectElement(element)
     if not select.attrb("multiple"):
@@ -896,7 +895,7 @@ proc append*(parent, node: Node) =
 proc reset*(form: HTMLFormElement) =
   for control in form.controls:
     control.resetElement()
-    control.rendered = false
+    control.invalid = true
 
 proc appendAttribute*(element: Element, k, v: string) =
   case k