Re: Browser inconsistencies in implementing name getters on forms and form element collections

On Fri, 15 Apr 2011 18:02:27 +0200, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 4/15/11 11:26 AM, Simon Pieters wrote:
>> Is this just for <img>?
>
> I only bothered to test <img>, but Gecko's implementation here looks for  
> anything that name lookups on Document look for (named  
> images/objects/applets/whatever, anything with an id, etc).

name
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/933

id
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/934

Opera 11.10
name and id
log: form: button, fieldset, input, img, keygen, object, select, textarea
log: elements: button, fieldset, input, keygen, object, select, textarea

Firefox nightly
name
log: form: applet, button, embed, fieldset, form, input, img, object,  
select, textarea
log: elements: button, fieldset, input, object, select, textarea
id
log: form: applet, button, embed, fieldset, input, img, object, select,  
textarea
log: elements: button, fieldset, input, object, select, textarea

Chrome dev
name and id
log: form: button, fieldset, input, img, isindex, keygen, object, select,  
textarea
log: elements: button, fieldset, input, img, isindex, keygen, object,  
select, textarea

Intersection
name and id
log: form: button, fieldset, input, img, keygen? (in Firefox keygen is a  
macro), object, select, textarea
log: elements: button, fieldset, input, keygen? (in Firefox keygen is a  
macro), object, select, textarea

(I don't have IE to test with currently.)

>> If Gecko changes and finds no compat problems then I'm sure Opera would
>> change to match the spec too. If however you do find compat problems
>> then that would be a good reason to change the spec.
>
> See, we don't plan to change this twice, at least not in a release; that  
> just screws authors over.  So either we'd like to change the spec or  
> change this once and then stick to this decision.  Which is where we  
> need buy-in from Opera and WebKit: if we all change this at once, that  
> gives us that much more leverage in getting websites updated.
>
> I suppose we could change this on our nightly channel and avoid shipping  
> it for a while...

I'd be interested in getting interop, I don't mind so much that the name  
lookup is there. I'd be fine with going with the intersection between  
Opera, Firefox and Chrome for which elements to support with name lookup.  
As it happens, the intersection matches Opera, and I haven't heard of  
compat reasons to add more elements to the list, so I suggest we spec that.

-- 
Simon Pieters
Opera Software

Received on Monday, 18 April 2011 07:01:39 UTC