[w3c/ServiceWorker] consider exposing a type attribute on Client (#1005)

Currently `Clients.matchAll()` considers three different types of Client objects:

1. Window
2. DedicatedWorker
3. SharedWorker

Currently its only possible to differentiate the Window client using `instanceof WindowClient`.  Since the algorithm operates on the type, though, it would be nice to expose it for dedicated and shared workers as well.

So, something like:

```
interface Client
{
  readonly attribute DOMString type;
}
```

The value would match those used in `Clients.matchAll()`.

As a side note, I find it annoying that "worker" is mapped to DedicatedWorker.  I think it would have been nicer to use "dedicatedworker" and make "worker" map to all Worker types.

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

Received on Wednesday, 16 November 2016 20:01:47 UTC