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

(None of this would be necessary if JS hadn't punted on the named-arguments thing.  If we had named arguments like Python, this would all be way easier - methods would just throw if you passed a new argument in an old browser, like they do for new positional arguments today.  Ugh.)

To be specific, if you define a dictionary like:

```
dictionary InterfaceMethodOptions {
  DOMString foo = "";
  long long bar = 0;
}
```

This would define an `InterfaceMethodOptions` value on the global shaped like:

```
window.InterfaceMethodOptions = {foo: true, bar: true};
```

By making this happen automatically in IDL, we get reasonably dependable support, without needing to rely on impls (a) remembering to update their "is this supported?" code, and (b) not lying.  This is similar to how `@supports` works "automatically" by just basing itself on whether the value parses or not.

---
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-207624461

Received on Friday, 8 April 2016 22:03:36 UTC