W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2008

Re: [selectors-api] Return value of lookupNamespaceURI

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Fri, 11 Jul 2008 23:12:57 -0400
Message-ID: <48782139.4020102@mit.edu>
To: Sam Weinig <weinig@apple.com>
CC: public-webapps@w3.org

Sam Weinig wrote:
> I believe undefined and null (as well as the empty string) should turn 
> into null.
> "While resolving either a prefix or the default namespace, if the 
> lookupNamespaceURI() method returns undefined or an empty string, the 
> implementation must act as if null had been returned."

Yes, that's what the prose says, but the IDL declares the return value 
to be a DOMString, and by the time you're done converting |undefined| to 
a String per ECMA rules you have "undefined".  That's what Gecko sees on 
the C++ end.

In other words, the prose and the IDL are inconsistent as they stand. 
If the IDL declared a return value which was of a type that could 
actually express |undefined| without a lossy type conversion, the prose 
requirement would make a lot more sense (but of course then you open 
other kettles of worms).

Received on Saturday, 12 July 2008 03:13:42 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:11 UTC