Re: [slightlyoff/ServiceWorker] consider allowing multiple worker thread instances for a single registration (#756)

Also, after thinking about this proposal more I think the change to `postMessage()` behavior is more breaking than the change to global state.  Most people already know that global state is going to be unreliable in service worker.

Its really confusing and unexpected, however, that `ServiceWorker.postMessage()` does not always go to a consistent place.

Perhaps we could address this by creating a separate ServiceWorker DOM object for each thread instance.  A controlled client would have a single ServiceWorker `.controller` and would therefore see just a single thread instance.  Push events, however, might go to a separate ServiceWorker DOM object and thread instance.

If we did this, though, we might need some API to "give me all the ServiceWorker instances for the currently active version", etc.

---
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/756#issuecomment-238275780

Received on Monday, 8 August 2016 21:03:28 UTC