W3C home > Mailing lists > Public > public-webapi@w3.org > May 2008

Re: [selectors-api] Extended Attribute [NoNull] in the IDL

From: Maciej Stachowiak <mjs@apple.com>
Date: Fri, 2 May 2008 19:55:08 -0700
Cc: "Web APIs WG (public)" <public-webapi@w3.org>
Message-Id: <59076D81-41CB-4934-B415-7A9210890319@apple.com>
To: Cameron McCormack <cam@mcc.id.au>


On May 2, 2008, at 7:37 PM, Cameron McCormack wrote:

>
> Boris Zbarsky:
>> In that case, the null behavior doesn't make any sense to me...  I  
>> would
>> expect querySelector(null) to either behave as  
>> querySelector("null") (as
>> in Opera) or as querySelector("") (as in Gecko and apparently  
>> Webkit)...
>
> If there’s a need for null to stringify to "", then I can add another
> extended attribute to Web IDL.

It needs to for many standard DOM methods. Most core DOM methods that  
take namespaces treat a null namespaceURI or prefix parameter the same  
as the empty string, not the same as the string "null". As mentioned,  
I advise looking at WebKit's IDL files since we have represented most  
of the weird cases there. I think the empty string conversion may  
actually be somewhat more common in DOM APIs, although it is not the  
native ECMAScript string conversion behavior.

Regards,
Maciej
Received on Saturday, 3 May 2008 02:55:47 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 3 May 2008 02:55:47 GMT