Re: Call for Consensus - Selectors API to Candidate Rec

Boris Zbarsky:
> On John Resig's tests in particular, every single failure in Gecko is  
> due to a violation of this part of the API:
>
>   Undefined=Empty
>
> This is using a WebIDL syntax from a working draft that we don't  
> implement yet, and the current JavaScript DOM binding in Gecko always  
> converts undefined in parameters to the string "undefined".
>
> If this part of WebIDL is stable, we can go ahead and implement it, but  
> I see no obvious evidence of that from the WebIDL working draft.

I started (but did not finish yet) looking at all the uses of DOMString
in various web specs to see what the default behaviour should be for
both [Null] and [Undefined].  So far, it seems that stringifying
undefined to "undefined" is much more widely implemented:

  http://mcc.id.au/2009/01/string-handling/string-handling

If that does end up being the more common behaviour, I’ll change the
default in Web IDL to be to stringify to "undefined" unless overridden,
and I would suggest Selectors API to use that behaviour, too.

-- 
Cameron McCormack ≝ http://mcc.id.au/

Received on Friday, 13 February 2009 00:15:39 UTC