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

Re: [whatwg] WebIDL and HTML5

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 25 Aug 2008 15:47:12 -0400
Message-ID: <48B30C40.3030900@mit.edu>
To: Garrett Smith <dhtmlkitchen@gmail.com>
CC: Web Applications Working Group WG <public-webapps@w3.org>

Garrett Smith wrote:
> The addition operator results in concatenation when either operand is
> a string. This results in a calls to the internal ToString, which is
> what I'm suggesting should be the general rule.

All I'm saying is that this will require annotating a very large number 
of API methods; possibly larger than an alternate general rule.

> I agree that loading path + '/null' or path + 'undefined' is not
> desirable. Any application that relies on this is already broken,
> arguably, because, contrary to your observations, safari first checks
> to see if the argument is null or undefined or the empty string

Indeed.  I mixed up Safari and Opera in my test.  So Opera does 
undefined -> "undefined" and null -> "null" for the first arg of 
window.open, while safari treats them as empty strings.

>> That can be the default, perhaps.  But I suspect usually null should become
>> "", not "null".
> 
> Why?

Honestly?  Because that's what Firefox does right now, except in certain 
special cases (window.open being one of them, actually), and things 
aren't breaking?  Unless other UAs are doing other things (and hence 
sites just don't rely on any particular behavior at all), this seems to 
indicate that web compat lies on the side of treating null as "".

-Boris
Received on Monday, 25 August 2008 19:47:58 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:27 GMT