Re: [csswg-drafts] [css-images] [css-values] Fetch algorithms require a style sheet, which may not exist (#12065)

Just wanted to point out another issue with the style sheet assumption here:

https://www.w3.org/TR/css-values-4/#fetch-a-style-resource
> 7. If sheet’s origin-clean flag is set, set req’s initiator type to "css". [CSSOM]

If we don't have a style sheet, we still have to set an initiator type here. Otherwise, a `PerformanceResourceTiming` timing event won't be fired for this fetch request (the event is gated by spec prose which states "If fetchParams’s request’s initiator type is not null" in the [fetch finale](https://fetch.spec.whatwg.org/#fetch-finale)).

WPT [has a test](https://wpt.live/css/fetching/fetch-resources.sub.html) which relies on this behavior.

-- 
GitHub Notification of comment by trflynn89
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12065#issuecomment-2854879200 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 6 May 2025 14:55:30 UTC