From 3c5aa0645bcc1d2481cdb4b03001afd96fd318e0 Mon Sep 17 00:00:00 2001 From: bptato Date: Sun, 2 Jul 2023 23:41:02 +0200 Subject: Add XHR/Event stubs --- src/html/env.nim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/html/env.nim') diff --git a/src/html/env.nim b/src/html/env.nim index 174f0a12..06289c4e 100644 --- a/src/html/env.nim +++ b/src/html/env.nim @@ -2,6 +2,7 @@ import selectors import streams import html/dom +import html/event import html/htmlparser import io/headers import io/loader @@ -15,7 +16,8 @@ import js/javascript import js/timeout import types/blob import types/url -import xhr/formdata as formdata_impl +import xhr/formdata +import xhr/xmlhttprequest # NavigatorID proc appCodeName(navigator: Navigator): string {.jsfget.} = "Mozilla" @@ -118,12 +120,14 @@ proc addScripting*(window: Window, selector: Selector[int]) = ctx.addDOMExceptionModule() ctx.addconsoleModule() ctx.addNavigatorModule() + ctx.addEventModule() ctx.addDOMModule() ctx.addURLModule() ctx.addHTMLModule() ctx.addIntlModule() ctx.addBlobModule() ctx.addFormDataModule() + ctx.addXMLHttpRequestModule() ctx.addHeadersModule() ctx.addRequestModule() ctx.addResponseModule() -- cgit 1.4.1-2-gfad0