Re: no longer treating explicit undefined as a missing, optional argument

Cameron McCormack:
> If we stop treating undefined as an omitted argument, then the only
> way you could write this in IDL would be:
>
> void open(DOMString method, DOMString url, optional boolean async,
> optional any user, optional any password);
>
> and to then handle in prose the user/password arguments so that
> undefined means "don't override the user/password from the url",
> which is what null means. Otherwise, we could introduce a new
> [TreatUndefinedAs=MissingArgument] extended attribute.

I've done this now; explicit undefined is not treated as a missing 
optional argument unless [TreatUndefinedAs=Missing] is specified on the 
optional argument, which shouldn't be used in specs unless required for 
compatibility.

Received on Thursday, 29 December 2011 04:15:07 UTC