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

Re: [whatwg] WebIDL and HTML5

From: Garrett Smith <dhtmlkitchen@gmail.com>
Date: Mon, 25 Aug 2008 11:10:23 -0700
Message-ID: <c9e12660808251110k1c70353fo7182ac3eb8699b45@mail.gmail.com>
To: "Boris Zbarsky" <bzbarsky@mit.edu>
Cc: "Web Applications Working Group WG" <public-webapps@w3.org>

On Mon, Aug 25, 2008 at 10:20 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> Garrett Smith wrote:
>>
>> I already expressed my opinion, agreeing with Liorean. For domstring
>> arguments, call the internal ToString on the input would be the
>> general rule, unless otherwise stated. This would seem to cover the
>> majority of cases.
>
> window.open is one of the cases when things are not covered, and that's what
> we were talking about, no?
>

That's the example Ian posted up. I think Ian may be a bit off in his
observations. undefined and null don't convert to the empty string in
window.open.

For example:-

window.open();

If the first argument is null or undefined or the empty string, no uri
is loaded and an blank/empty window is displayed. There seems to be no
mapping though Ian has requested documenting such mapping.

Are there other examples for "if the argument is null or undefined..."?

There are probably others but I can't think of them. I think the
majority of the time that strings will want to go to ToString,
booleans will want to go to ToBoolean.

I can see no reason for special-casing innerHTML = null.. Any
application that uses such technique is arguably already broken.

Garrett

> -Boris
>
Received on Monday, 25 August 2008 18:10:57 GMT

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