about summary refs log tree commit diff stats
path: root/src/html/xmlhttprequest.nim
diff options
context:
space:
mode:
Diffstat (limited to 'src/html/xmlhttprequest.nim')
-rw-r--r--src/html/xmlhttprequest.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/html/xmlhttprequest.nim b/src/html/xmlhttprequest.nim
index 2ab6b88d..1fc2e8d7 100644
--- a/src/html/xmlhttprequest.nim
+++ b/src/html/xmlhttprequest.nim
@@ -164,10 +164,10 @@ proc fireProgressEvent(window: Window; target: EventTarget; name: StaticAtom;
     total: length,
     lengthComputable: length != 0
   ))
-  discard window.dispatchEvent(event, target)
+  discard window.jsctx.dispatch(target, event)
 
 # Forward declaration hack
-var windowFetch* {.compileTime.}: proc(window: Window; input: JSRequest;
+var windowFetch*: proc(window: Window; input: JSRequest;
   init = none(RequestInit)): JSResult[FetchPromise] {.nimcall.} = nil
 
 proc errorSteps(window: Window; this: XMLHttpRequest; name: StaticAtom) =