[ServiceWorker] Can we add some options to ClientQueryOptions? (#801)

Hi all,

I'm Jinho Bang and Blink contributor (I'm interested in service worker)

Can we add some options to ClientQueryOptions?

For example, if there is a FrameType option in ClientQueryOptions, we can simplify the following code

Before:
```
// Imagine that we have to do something to client if frameType == 'nested'
clientsmatchAll()then(function(client_list) {
  client_listforEach(function(client) {
    if (clientframeType == 'nested')
      // do something
  });
});
```

After:
```
// If we have FrameType option,
clientsmatchAll({ frameType : 'nested' })then(function(client_list) {
  // do something
});
```

We will add other options such as id, url and other things

Also, we can add clientsmatch() method as well (I think)

```
clientsmatch({ frameType : 'nested' })then(function(client) {
  // do something to first nested client
});
```

I think it's simpler and more convenient

What do you think?

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

Received on Thursday, 17 December 2015 08:04:55 UTC