LibWeb: Set Fetch destination of <link rel="stylesheet"> requests

This commit is contained in:
Luke Wilde 2024-11-28 17:21:50 +00:00 committed by Shannon Booth
parent 1edf7a8aa2
commit 07231e74c7
Notes: github-actions[bot] 2025-06-30 22:25:50 +00:00

View file

@ -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;
}