From 07231e74c7396fea6bdf3ae1763930f08a0be4a4 Mon Sep 17 00:00:00 2001 From: Luke Wilde Date: Thu, 28 Nov 2024 17:21:50 +0000 Subject: [PATCH] LibWeb: Set Fetch destination of requests --- Libraries/LibWeb/HTML/HTMLLinkElement.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Libraries/LibWeb/HTML/HTMLLinkElement.cpp b/Libraries/LibWeb/HTML/HTMLLinkElement.cpp index 2844e9a03ee..3930d861ed5 100644 --- a/Libraries/LibWeb/HTML/HTMLLinkElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLLinkElement.cpp @@ -563,6 +563,10 @@ bool HTMLLinkElement::stylesheet_linked_resource_fetch_setup_steps(Fetch::Infras if (document().is_render_blocking_element(*this)) request.set_render_blocking(true); + // FIXME: We currently don't set the destination for stylesheets, so we do it here. + // File a spec issue that the destination for stylesheets is not actually set if the `as` attribute is missing. + request.set_destination(Fetch::Infrastructure::Request::Destination::Style); + // 5. Return true. return true; }