diff options
author | bptato <nincsnevem662@gmail.com> | 2023-10-25 15:02:39 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-10-25 15:06:55 +0200 |
commit | daaaa6343510889f2b1ae29647ec81c376a1641b (patch) | |
tree | b2491df9590ff94ef07163e493e155157819ac79 | |
parent | 9d4f8dc7a7f0a49d2f78cd81c9812852f906c518 (diff) | |
download | chawan-daaaa6343510889f2b1ae29647ec81c376a1641b.tar.gz |
dom: expose head, body, window (as defaultView)
-rw-r--r-- | src/html/dom.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/html/dom.nim b/src/html/dom.nim index e8fa0071..b883fd42 100644 --- a/src/html/dom.nim +++ b/src/html/dom.nim @@ -169,7 +169,7 @@ type Document* = ref object of Node charset*: Charset - window*: Window + window* {.jsget: "defaultView".}: Window url* {.jsget: "URL".}: URL mode*: QuirksMode currentScript: HTMLScriptElement @@ -1550,13 +1550,13 @@ func html*(document: Document): HTMLElement = for element in document.elements(TAG_HTML): return HTMLElement(element) -func head*(document: Document): HTMLElement = +func head*(document: Document): HTMLElement {.jsfget.} = let html = document.html if html != nil: for element in html.elements(TAG_HEAD): return HTMLElement(element) -func body*(document: Document): HTMLElement = +func body*(document: Document): HTMLElement {.jsfget.} = let html = document.html if html != nil: for element in html.elements(TAG_BODY): |