Re: [heycam/webidl] A non-optional dictionary argument makes sense at times. (#130)

So DOM has
```
  void observe(Node target, MutationObserverInit options);
```
which is invalid per this.  It looks like Edge and Chrome implemented it per spec, and Firefox ignores the spec and makes it optional.  This does not suggest to me that this way of encouraging good spec-writing practices is particularly effective, insofar as one of our largest and best-maintained specs just ignores it, and the one implementation that had the opportunity to notice (Gecko's WebIDL parser enforces validity) silently changed the IDL to make the warning go away.  DOM has had this IDL line since at least 2012 and presumably forever, and Gecko made it optional also [since 2012](https://hg.mozilla.org/mozilla-central/rev/e1427a1f27c4).

So while I don't argue with the goals of this restriction, I don't know if it's actually doing enough to warrant the confusingness of having a spec's IDL call something "optional" when really it's not.  Where are these validity requirements expected to be enforced such that spec writers will notice or care?

-- 
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/130#issuecomment-242988598

Received on Sunday, 28 August 2016 17:49:32 UTC