[slightlyoff/ServiceWorker] Add client "close" event (#868)

If a SW wants to map a `clientId` to some state, there's no good way to know when to remove the map key. Adding an event that is fired when a client is closed would make this simpler.

Note you can't use a `WeakMap`, since `clients.get()` returns a different Client object every time even for the same `clientId`, so the same client gets added as new keys every time (which IMO is a nasty gotcha).

---
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/868

Received on Wednesday, 6 April 2016 11:01:32 UTC