Re: [heycam/webidl] Need pattern for feature detecting dictionary members (#107)

> The biggest issue I see is the one you point out about partial support. In particular I can imagine unfortunate coding patterns which end up attempting all combinations of arguments to find the one that has the maximal amount of features the developer wants to use, but still returns true.

I was expecting `supports` would return `true` when all of the supplied dictionary members or enum values were known (but wouldn't, for example, return `false` just because a required member wasn't supplied - `supports` doesn't actually take the dictionary type itself).  Then if a developer wants to determine the full set of supported options, she needs to call `supports` once for each option she's interested in.  I don't think there'd be any combinatorial scenario, i.e.:
```javascript
  (foo.supports({a:true}) && foo.supports({b:true}) ===
    foo.supports({a:true, b:true})
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/107#issuecomment-304127772

Received on Thursday, 25 May 2017 21:21:58 UTC