Re: [ServiceWorker] How are unloaded tabs represented? (#626)

One question is how much it will help to expose the evicted client concept to devs. FWIW, it seems it's the UA that actually uses the evicted state information. That is, it's the UA that uses that state information to restore the tabs, to exclude those evicted tabs in the decision on their service worker's Activate (waiting -> active) process, etc.

In the case we don't come up with compelling use cases/requirements, an option would be to define and use an internal slot, `WindowClient`'s _evicted flag_, and make the UA use this in the related algorithms. For instance, we can put a step before step 5 in [client.postMessage()](https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#client-postmessage) that checks whether the context object's evicted flag is set, and if so reject the returned promise with an exception.

I think the decision hinges on whether devs really need it.

---
Reply to this email directly or view it on GitHub:
https://github.com/slightlyoff/ServiceWorker/issues/626#issuecomment-95542081

Received on Thursday, 23 April 2015 11:05:44 UTC