Re: [whatwg] WebIDL and HTML5

Garrett Smith wrote:
>>   [Null=Null, Undefined=Null]
>>   [Null=Null, Undefined=Empty]
>>   [Null=Empty, Undefined=Empty]
>>   [Null=Null, Undefined=String]
>>   [Null=Empty, Undefined=String]
>>   [Null=String, Undefined=String]
>>
>> ...so that we can do, e.g.:
>>
>>   Window open([Null=String, Undefined=String] in DOMString url,
>>               [Null=String, Undefined=Empty] in DOMString name,
>>               [Null=Empty, Undefined=Empty] in DOMString features);
>>
>> ...or whatever is appropriate.
> 
> Why such complexities?

Because existing implementations sometimes treat null as meaning empty 
string and sometimes as meaning the string "null" and sometimes as 
meaning a special value that is not actually quite the same as the empty 
string.  Note that some of this is required by some existing specifications.

Similar for undefined.

Expressing that in the IDL requires the above setup, unless you have a 
better proposal?

-Boris

Received on Monday, 25 August 2008 15:10:19 UTC