Re: [whatwg/fetch] Return a "controller" instance from fetch (#1329)

@annevk commented on this pull request.



> @@ -3756,6 +3804,9 @@ the request.
  <a for="fetch params">cross-origin isolated capability</a> is
  <var>crossOriginIsolatedCapability</var>.
 
+ <li><p>If <var>processFetchStart</var> is not null, invoke <var>processFetchStart</var> with
+ <var>fetchParams</var>'s <a for="fetch params">controller</a>.

HTTP fetch always runs in parallel so in principle we can indeed "wait" for something to happen. Or we could split HTTP fetch and invoke the subsequent part from the callback.

However, I think a simpler version could be that we share the fetch controller with the service worker. That way the service worker can observe the state and act accordingly. That would require less refactoring and less data structures. What do you think?

-- 
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/1329#discussion_r750265357

Received on Tuesday, 16 November 2021 13:21:20 UTC