about summary refs log tree commit diff stats
path: root/src/html
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-03-08 09:11:43 +0100
committerbptato <nincsnevem662@gmail.com>2023-03-08 09:11:43 +0100
commitd0addf4a543689994d3f7d2f9a2d290b1a8dff85 (patch)
tree753322e8cfb1f95f9447806768d3591f5e6156d1 /src/html
parentd93761efa26ac50db377943ac70b8d93e6061d2c (diff)
downloadchawan-d0addf4a543689994d3f7d2f9a2d290b1a8dff85.tar.gz
dom: set document url in constructor
Diffstat (limited to 'src/html')
-rw-r--r--src/html/dom.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/html/dom.nim b/src/html/dom.nim
index 6d50c460..8b0019b1 100644
--- a/src/html/dom.nim
+++ b/src/html/dom.nim
@@ -1377,7 +1377,8 @@ func newHTMLElement*(document: Document, localName: string, namespace = Namespac
 
 func newDocument*(): Document {.jsctor.} =
   result = Document(
-    nodeType: DOCUMENT_NODE
+    nodeType: DOCUMENT_NODE,
+    url: newURL("about:blank")
   )
   result.document = result
   result.implementation = DOMImplementation(document: result)