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

[selectors-api] NSResolver question: non-String returns

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 11 Mar 2008 23:58:35 -0500
Message-ID: <47D762FB.2010607@mit.edu>
To: Web APIs WG <public-webapi@w3.org>

I've been thinking about this some more, and the requirement that the 
caller be able to tell apart the NSResolver returning a String and some 
other object that has a toString() method is actually a bit of a pain. 
For example, in Gecko a C++ caller into this API would just get back a 
string object (basically the result of |returnValue + ""| or so). 
Telling where this string came from would actually be pretty difficult 
in this case.

Things get even worse if you allow non-JS implementations of NSResolver, 
because at that point the requirement doesn't even make sense.

Is there a strong reason not to just stringify whatever the NSResolver 
returns?  It seems like for compliant NSResolvers this won't make a 
difference, right?

-Boris
Received on Wednesday, 12 March 2008 04:59:06 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 12 March 2008 04:59:07 GMT