aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-11-22 18:23:31 +0100
committerbptato <nincsnevem662@gmail.com>2024-11-22 18:23:31 +0100
commit309852b46d93bc33e5ddaa1c5c49d071f71f0900 (patch)
tree1798d50344d0daba7f6ebed56ac9a04caed12ea8 /src
parent3232559179baa31533ba6575f58d5d0ebbfda454 (diff)
downloadchawan-309852b46d93bc33e5ddaa1c5c49d071f71f0900.tar.gz
dom: add document.compatMode
Diffstat (limited to 'src')
-rw-r--r--src/html/dom.nim5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/html/dom.nim b/src/html/dom.nim
index 45c37ca7..99cced5d 100644
--- a/src/html/dom.nim
+++ b/src/html/dom.nim
@@ -1407,6 +1407,11 @@ func childNodes(node: Node): NodeList {.jsfget.} =
func isForm(node: Node): bool =
return node of HTMLFormElement
+func compatMode(document: Document): string {.jsfget.} =
+ if document.mode == QUIRKS:
+ return "BackCompat"
+ return "CSS1Compat"
+
func forms(document: Document): HTMLCollection {.jsfget.} =
if document.cachedForms == nil:
document.cachedForms = newCollection[HTMLCollection](