Re: [Future] First arguments should not be optional
Cameron McCormack <[email protected]>
| Newsgroups | gmane.comp.web.dom.general |
|---|---|
| Message-ID | <[email protected]> |
Jonas Sicking wrote: > On Wed, May 8, 2013 at 11:02 AM, Domenic Denicola > <[email protected]> wrote: >> This is a good illustration of the kind of conflict between DOM API designers and normal ECMAScript semantics. Normal ECMAScript semantics would demand that `undefined` and no parameter be treated the same. > > That's the agreed upon behavior for WebIDL as way, however I don't > think the spec has yet been updated to match that. Yes. You should be able to write Future catch(optional AnyCallback rejectCallback); and have that cause new Future().catch(undefined) to mean the same as new Future().catch() while new Future().catch(null) throws. Spec fix coming some time soon...