According to the HTML5 spec we should be returning a node collection if there are multiple matches, both for HTMLSelectElement and HTMLOptionsCollection. So neither Safari or chromium is in conformance to this. Safari always returns null for named elements in HTMLSelectElement no matter how many matches and chromium returns at most 1 element for both HTMLSelectElement and HTMLOptionsCollection. The relevant parts of the spec are: http://dev.w3.org/html5/spec/Overview.html#the-select-element and http://dev.w3.org/html5/spec/Overview.html#htmloptionscollection-0
Dave On Thu, Apr 9, 2009 at 2:22 PM, Ian Hickson <i...@hixie.ch> wrote: > On Thu, 9 Apr 2009, David Moore wrote: > > > > I've looked at FF, IE and Opera. FF doesn't support named item access > > from an HTMLSelectElement. It does support it from > > HTMLOptionsCollection, and returns 1 element even if there are multiple > > options with the same name. > > > > IE doesn't support named item access from either HTMLSelectElement or > > HTMLOptionsCollection. > > > > Opera supports named item access from both HTMLSelectElements and > > HTMLOptionsCollections. In both cases it returns a single element if > > there are duplicate names. > > Note that HTML5 defines the expected behaviour here in some detail. > > -- > Ian Hickson U+1047E )\._.,--....,'``. fL > http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. > Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' >
_______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev