Re: [w3c/ServiceWorker] Find a way for service workers to get their current state (#1077)

If we stick this on `ServiceWorkerRegistration` we then have an attribute that is always unpopulated in other contexts.

I would also note we have another issue somewhere about referencing the current global as a `Client`, which is similar to this.  Might be nice to make the naming be similar for the two concepts.

Maybe something like `self.asServiceWorker` and `self.asClient()`?

```
interface WindowOrWorker
{
  // returns a new snapshot
  Client asClient();
};

interface ServiceWorkerGlobalScope
{
  [SameObject]
  readonly attribute ServiceWorker asServiceWorker;
};
```

-- 
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/1077#issuecomment-292261660

Received on Thursday, 6 April 2017 18:16:34 UTC