W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2013

Re: [Future] First arguments should not be optional

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 08 May 2013 18:52:20 -0400
Message-ID: <518AD724.7040104@mit.edu>
To: www-dom@w3.org
On 5/8/13 6:39 PM, Cameron McCormack wrote:
> 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)

You can already do that in WebIDL:

   Future catch([TreatUndefinedAs=Missing] optional AnyCallback 
rejectCallback);

no?

-Boris
Received on Wednesday, 8 May 2013 22:52:48 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:20 UTC