about summary refs log tree commit diff stats
path: root/src/html
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-02-24 18:48:51 +0100
committerbptato <nincsnevem662@gmail.com>2024-02-24 18:48:51 +0100
commit2e0108397fe279a2a1dcbbacfa1515d5db297dc2 (patch)
treec9156bd467bc0db2e4eaf771071e91ce32ffce9b /src/html
parentf11c942585446be074412b2cc270f30532351882 (diff)
downloadchawan-2e0108397fe279a2a1dcbbacfa1515d5db297dc2.tar.gz
dom: check rel attribute for link tags before download
Diffstat (limited to 'src/html')
-rw-r--r--src/html/dom.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/html/dom.nim b/src/html/dom.nim
index 39a80681..17f11486 100644
--- a/src/html/dom.nim
+++ b/src/html/dom.nim
@@ -2852,7 +2852,7 @@ proc reflectAttrs(element: Element, name: CAtom, value: string) =
   of TAG_LINK:
     let link = HTMLLinkElement(element)
     if link.isConnected and (name == atRel and value == "stylesheet" or
-        name == atHref):
+        name == atHref and link.attr(atRel) == "stylesheet"):
       link.fetchStarted = false
       let window = link.document.window
       if window != nil: