about summary refs log tree commit diff stats
path: root/src/html
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-11-27 19:23:35 +0100
committerbptato <nincsnevem662@gmail.com>2023-11-27 19:23:35 +0100
commit7fae592de5beaa88bf82b497a3bf06be372d20cb (patch)
treec42791cf9888316ce99c5e35505b39371fed5e31 /src/html
parent860893abaefef5f95537e584c9325e23ecb1b394 (diff)
downloadchawan-7fae592de5beaa88bf82b497a3bf06be372d20cb.tar.gz
dom: add document.readyState
Diffstat (limited to 'src/html')
-rw-r--r--src/html/dom.nim6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/html/dom.nim b/src/html/dom.nim
index a5aec266..941d3ce7 100644
--- a/src/html/dom.nim
+++ b/src/html/dom.nim
@@ -87,6 +87,11 @@ type
     of RESULT_IMPORT_MAP_PARSE:
       discard #TODO
 
+type DocumentReadyState* = enum
+  READY_STATE_LOADING = "loading"
+  READY_STATE_INTERACTIVE = "interactive"
+  READY_STATE_COMPLETE = "complete"
+
 type
   Location = ref object
     window: Window
@@ -176,6 +181,7 @@ type
     isxml*: bool
     implementation {.jsget.}: DOMImplementation
     origin: Origin
+    readyState* {.jsget.}: DocumentReadyState
 
     scriptsToExecSoon*: seq[HTMLScriptElement]
     scriptsToExecInOrder*: Deque[HTMLScriptElement]