Re: [ServiceWorker] Allow respondWith() to be called asynchronously or allow some way to cancel the response. (#836)

It seems like a better solution to the OP's use case is for them to provide a middleware framework, so that there's still only one fetch listener, but they have control over exactly how that listener delegates to various middleware in the chain. See e.g. http://expressjs.com/en/guide/using-middleware.html which shows how a popular server-side framework manages to leverage Node.js's single request-processing callback (analogous to the single onfetch event) into a composable system of chained middleware.

---
Reply to this email directly or view it on GitHub:
https://github.com/slightlyoff/ServiceWorker/issues/836#issuecomment-186333346

Received on Friday, 19 February 2016 18:01:34 UTC