- From: Domenic Denicola <notifications@github.com>
- Date: Tue, 10 Jan 2017 18:34:21 -0800
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 11 January 2017 02:34:52 UTC
@jungkees yeah, I see. I think that is a bad design and if you want that code to work it should be coded as
```js
addEventListener('push', e => {
let outResolve;
let p = new Promise(resolve => { outResolve = resolve; });
e.waitUntil(p.then(() => {
e.waitUntil(q);
});
setTimeout(() => outResolve(), 1);
});
```
since then you actually "wait until" the argument (instead of "wait until-but-also-wait-an-extra-turn" the argument). But it's not a huge deal.
--
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/pull/1049#issuecomment-271761346
Received on Wednesday, 11 January 2017 02:34:52 UTC