Re: [w3c/ServiceWorker] provide a way to execute work after browser has consumed a response (#1397)

Feels like this is a problem worth solving. I prefer `.responded` (or whatever we call it) to `respondWith` returning a promise, as it plays nicer with `waitUntil`.

Another option is:

```js
evt.afterResponse(async () => {
  await doCompletionWork(response);
});
```

This would call `waitUntil` under the hood. My thinking is that using `.responded` without `waitUntil` is an antipattern that we might want to prevent.

My feelings aren't particularly strong though, so if no one's excited about this I'm happy with `.responded`.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/1397#issuecomment-479021510

Received on Tuesday, 2 April 2019 14:26:34 UTC