- From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
- Date: Thu, 09 Sep 2021 22:29:46 +0000
- To: public-css-archive@w3.org
Gathering some chat feedback so it doesn't get lost: (from Andreu Botella): > So I'm not an expert on fetch by any means, but there's a few things that stand out to me > * If the original stylesheet was linked to with <link crossorigin>, you'd presumably want imports to use mode "cors" and credentials mode "same-origin", right? > * Unless you explicitly set the request's synchronous mode, fetch will not block, so you don't want to run it in parallel. Instead of that, you should set one or more of the optional algorithms that are passed to fetch: "processResponse" if you just need a response, or "processResponseEndOfBody" which will give you a response and a byte sequence. Those algorithms will be run in tasks on the networking task source, with the event loop that corresponds to request's client. > * And request's client should be a Window's environment settings object, I believe (from Anne): > Request's client is an environment settings object and used for defaulting of certain things. For CSS this would typically be the one associated with the document ultimately responsible for the request. Now CSS is complex and does some things differently so you might need to set certain things yourself, such as the referrer field. Also, you no longer have to go in parallel or queue a task, you can pass your callbacks to fetch and it'll do all that for you. -- GitHub Notification of comment by tabatkins Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4838#issuecomment-916484544 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 9 September 2021 22:29:48 UTC