about summary refs log tree commit diff stats
path: root/src/html
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-09-15 18:41:20 +0200
committerbptato <nincsnevem662@gmail.com>2024-09-15 19:13:08 +0200
commitb7ac2954a90e44fd727c770c47e8f9706b40004f (patch)
treec058565a825d89d1364067fd1c54718e8830db0d /src/html
parent9f453ca3997528252eb28268e38480f58fbce4f6 (diff)
downloadchawan-b7ac2954a90e44fd727c770c47e8f9706b40004f.tar.gz
loader: refactor/move around some procs
Module boundaries didn't make much sense here either. Specifically:

* loader/cgi was originally just one of the many "real" protocols
  supported by loader, so it was in a separate module (like the other
  ones). Now it's mostly an "internal" protocol, and it was getting
  cumbersome to pass all required loader state to loadCGI.
* The loader interface has grown quite large, but there is no need for
  (or advantage in) putting it in the same module as the implementation.

Now CGI is handled by loader, and the interface is in the new module
"loaderiface".
Diffstat (limited to 'src/html')
-rw-r--r--src/html/dom.nim7
-rw-r--r--src/html/env.nim2
-rw-r--r--src/html/xmlhttprequest.nim2
3 files changed, 6 insertions, 5 deletions
diff --git a/src/html/dom.nim b/src/html/dom.nim
index 9275538c..2a4dc921 100644
--- a/src/html/dom.nim
+++ b/src/html/dom.nim
@@ -19,8 +19,6 @@ import html/catom
 import html/enums
 import html/event
 import html/script
-import types/bitmap
-import types/path
 import io/bufwriter
 import io/dynstream
 import io/promise
@@ -28,8 +26,9 @@ import js/console
 import js/domexception
 import js/timeout
 import loader/headers
-import loader/loader
+import loader/loaderiface
 import loader/request
+import loader/response
 import monoucha/fromjs
 import monoucha/javascript
 import monoucha/jserror
@@ -38,12 +37,14 @@ import monoucha/jspropenumlist
 import monoucha/jsutils
 import monoucha/quickjs
 import monoucha/tojs
+import types/bitmap
 import types/blob
 import types/canvastypes
 import types/color
 import types/line
 import types/matrix
 import types/opt
+import types/path
 import types/referrer
 import types/url
 import types/vector
diff --git a/src/html/env.nim b/src/html/env.nim
index ea55dcbc..ab9a9be5 100644
--- a/src/html/env.nim
+++ b/src/html/env.nim
@@ -17,7 +17,7 @@ import js/encoding
 import js/intl
 import js/timeout
 import loader/headers
-import loader/loader
+import loader/loaderiface
 import loader/request
 import loader/response
 import monoucha/javascript
diff --git a/src/html/xmlhttprequest.nim b/src/html/xmlhttprequest.nim
index cffd2357..67123904 100644
--- a/src/html/xmlhttprequest.nim
+++ b/src/html/xmlhttprequest.nim
@@ -13,7 +13,7 @@ import io/dynstream
 import io/promise
 import js/domexception
 import loader/headers
-import loader/loader
+import loader/loaderiface
 import loader/request
 import loader/response
 import monoucha/fromjs