about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/html/dom.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/html/dom.nim b/src/html/dom.nim
index d322049c..c705cc35 100644
--- a/src/html/dom.nim
+++ b/src/html/dom.nim
@@ -2718,6 +2718,8 @@ var appliesFwdDecl*: proc(mqlist: MediaQueryList, window: Window): bool
 # see https://html.spec.whatwg.org/multipage/links.html#link-type-stylesheet
 #TODO make this somewhat compliant with ^this
 proc loadResource(window: Window, link: HTMLLinkElement) =
+  if link.attr(atRel) != "stylesheet":
+    return
   if link.fetchStarted:
     return
   link.fetchStarted = true