W3C home > Mailing lists > Public > public-html@w3.org > September 2009

Re: Web IDL Garden Hose

From: Maciej Stachowiak <mjs@apple.com>
Date: Sun, 27 Sep 2009 16:26:09 -0700
Cc: "public-webapps@w3.org" <public-webapps@w3.org>, HTML WG <public-html@w3.org>, es-discuss <es-discuss@mozilla.org>
Message-id: <6003C677-5F6F-47C8-B515-85B4C23644DE@apple.com>
To: Boris Zbarsky <bzbarsky@MIT.EDU>

On Sep 27, 2009, at 12:37 PM, Boris Zbarsky wrote:

> On 9/27/09 2:28 AM, Maciej Stachowiak wrote:
>> This is not an issue for DOM methods. It's an issue for interfaces  
>> such
>> as HTMLCollection and HTMLFormElement that support indexing by  
>> function
>> call syntax, for legacy compatibility reasons.
>
> Huh.  Gecko hasn't supported this, and we haven't had problems with  
> it.  Is it really for legacy compat reasons, of just because more  
> than one vendor happens to support it without really knowing why,  
> like tags() on HTMLCollection?  Did Webkit and Opera have particular  
> compat issues without implementing this stuff?
>
> For what it's worth, I just tested and it looks like Opera and  
> Webkit support () on HTMLCollection; the former doesn't support it  
> on the return value of getElementsByTagName while the latter does.   
> Gecko does not support either.  The spec also has the () thing going  
> on for HTMLFormControlsCollection; again we've never had any serious  
> compat problems with this in Gecko.
>
> As for HTMLFormElement, while the spec says what it says, it's not  
> exactly for "compatibility reasons" other than "IE must be willing  
> to implement this spec and nothing outside this spec", I assume.   
> Both Opera and Webkit throw in this testcase:
>
> <!DOCTYPE html>
> <body>
>  <form name="foo">
>  <input name="bar">
>    <script>try {
>      alert(document.foo("bar"));
>    } catch(e) { alert(e); }
>    </script>
>
> whereas they should return the input, per spec.
>
> I hadn't realizes the spec required this syntax, and I would be  
> somewhat interested in understanding why it does and whether it's  
> actually required "for compatibility reasons" (in the sense that a  
> new UA on the market would have to implement it to be compatible  
> with existing sites).

I wouldn't be against dropping things that we really think are  
useless. Keep in mind though, there is still old content (yes, often  
on Intranets, but sometimes publicly accessible) that just assumes IE,  
but more or less works if you implement enough IE-isms. That's the  
rationale behind undetectable document.all. Callable collections are  
based on the same kind of reasoning. Historically, Opera and Safari  
(and Konqueror/KHTML before us) have been somewhat more willing to  
implement weird IE-isms than Mozilla.

Regards,
Maciej
Received on Sunday, 27 September 2009 23:27:12 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:49 GMT