Re: [ServiceWorker] should update() during top level script evaluation be ignored? (#800)

I think the easiest way to handle this would be to do something like this in ServiceWorkerRegistration.update():

1. If the entry settings object is a ServiceWorkerGlobalScope (or appropriate text to determine its being called within a service worker).
  1. If the ServiceWorkerGlobalScope's associated service worker's state is 'installing', reject the promise with an InvalidStateError and abort these steps.

Would something like that work?

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

Received on Friday, 25 March 2016 15:10:41 UTC