diff options
author | bptato <nincsnevem662@gmail.com> | 2024-03-12 19:51:03 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-03-12 20:20:24 +0100 |
commit | 22480a38c618aea42285b20868231f247932f2ab (patch) | |
tree | ba9b562124c1c30782ed87cd94122e962b80f637 /src/html | |
parent | 232d861836993d81f7828a2917e8d242a23194e0 (diff) | |
download | chawan-22480a38c618aea42285b20868231f247932f2ab.tar.gz |
loader: remove applyHeaders
Better compute the values we need on-demand at the call sites; this way, we can pass through content type attributes to mailcap too. (Also, remove a bug where applyResponse was called twice.)
Diffstat (limited to 'src/html')
-rw-r--r-- | src/html/dom.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/html/dom.nim b/src/html/dom.nim index 23dd49f2..81504d56 100644 --- a/src/html/dom.nim +++ b/src/html/dom.nim @@ -2776,7 +2776,7 @@ proc loadResource(window: Window, link: HTMLLinkElement) = let res = res.get #TODO we should use ReadableStreams for this (which would allow us to # parse CSS asynchronously) - if res.contentType == "text/css": + if res.getContentType() == "text/css": return res.text() res.unregisterFun() ).then(proc(s: JSResult[string]) = @@ -2803,7 +2803,7 @@ proc loadResource(window: Window, image: HTMLImageElement) = if res.isErr: return let res = res.get - if res.contentType == "image/png": + if res.getContentType() == "image/png": return res.blob() ).then(proc(pngData: JSResult[Blob]) = if pngData.isErr: |