Re: [whatwg/fetch] Integration with preload (PR #1342)

@yoavweiss commented on this pull request.



> +
+   <li><p><var>hasCustomHeaders</var> is false
+
+   <li><p><var>request</var>'s <a for=request>window</a> is not null
+
+   <li><p><var>request</var>'s <a for=request>method</a> is `<code>GET</code>`
+  </ul>
+
+  <p>then perform the following steps:
+
+  <ol>
+   <li><p>Let <var>preloadedResourceConsumed</var> be the result of invoking
+   <span>consume a preloaded resource</span> for <var>req</var>'s <a for=request>window</a>,
+   given <var>req</var>'s <a for=request>URL</a>, <var>req</var>'s <a for=request>destination</a>,
+   <var>req</var>'s <a for=request>mode</a>, <var>req</var>'s <a for=request>credentials mode</a>,
+   <var>req</var>'s <a for=request>integrity metadata</a>, and the next step <a>in parallel</a>: Run

It'd be clearer IMO to pass a helper algorithm here.

> +   <a>HTTP(S) scheme</a>
+
+   <li><p><var>request</var>'s <a for=request>mode</a> is "<code>same-origin</code>",
+   "<code>cors</code>", or "<code>no-cors</code>"
+
+   <li><p><var>hasCustomHeaders</var> is false
+
+   <li><p><var>request</var>'s <a for=request>window</a> is not null
+
+   <li><p><var>request</var>'s <a for=request>method</a> is `<code>GET</code>`
+  </ul>
+
+  <p>then perform the following steps:
+
+  <ol>
+   <li><p>Let <var>onPreloadedResponseAvailable</var> be to run the following step

Maybe "Let onPreloadedResponseAvailabe be an algorithm that runs the following steps..."?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/1342#pullrequestreview-799933589

Received on Monday, 8 November 2021 10:27:20 UTC