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

> As noted on Matrix we need to account for service workers and in particular "handle fetch". Either we make it so that "handle fetch" returns a controller for the service worker fetch event, or we pass the controller into "handle fetch" so the service worker can observe it. The former seems a bit nicer as it reuses the pattern introduced here and could be used for other kinds of information exchange in the future. It would require "handle fetch" to take a callback.
> 
> @yutakahirano @jakearchibald @noamr thoughts?

See https://github.com/w3c/ServiceWorker/pull/1612 and latest revision of this PR.
- Instead of returning a controller, we emit it in a new `onFetchStart` callback
- Termination of the service worker and of fetches initiated by the service worker are done explicitly

-- 
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#issuecomment-963127628

Received on Monday, 8 November 2021 13:02:34 UTC