- From: Jake Archibald <notifications@github.com>
- Date: Thu, 14 Dec 2017 11:42:24 +0000 (UTC)
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 14 December 2017 11:42:46 UTC
Since this is related to the registration, this promise should really go on the registration. That way it can be used on all the origin's registrations. I feel that there may be a more general way to solve this. For example, what if `statechange` bubbled to the registration? Combined with https://github.com/whatwg/dom/issues/544 you could do: ```js async function waitingWorker(reg) { if (reg.waiting) return; return reg.on('statechange').filter(e => e.target.state == 'installed').first(); } ``` -- 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/1222#issuecomment-351687900
Received on Thursday, 14 December 2017 11:42:46 UTC