W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2012

Re: [whatwg] Why do HTML*Collection's nameItem need to return 5 different objects?

From: Simon Pieters <simonp@opera.com>
Date: Thu, 06 Sep 2012 10:46:34 +0200
To: "Ryosuke Niwa" <rniwa@webkit.org>, "Ian Hickson" <ian@hixie.ch>
Message-ID: <op.wj7hbwm9idj3kv@simons-macbook-pro.local>
Cc: "<whatwg@whatwg.org>" <whatwg@whatwg.org>
On Wed, 05 Sep 2012 22:47:07 +0200, Ian Hickson <ian@hixie.ch> wrote:

>    http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1736
> Webkit returns undefined, whereas IE, Gecko, and Opera all return an
> HTMLCollection. (IE returns an HTMLCollection with a tags() method, Gecko
> and Opera do not. The spec requires an HTMLAllCollection, which is the
> kind of collection that has a tags() method in the spec; in IE, all
> collections have a tags() method, and document.all is actually a regular
> HTMLCollection. We could change the spec here, e.g. to put tags() on all
> collections or to just forget about tags() on the subcollection here.)

I thought we had agreed to drop tags() everywhere except for the  
document.all collection. I guess the collection returned by  
document.all.foo wasn't discussed back then, though. Opera and Firefox  
don't support tags() there, which suggests it's not needed for compat, so  
maybe the spec should side with Opera/Firefox and return HTMLCollection  
instead of HTMLAllCollection.

Simon Pieters
Opera Software
Received on Thursday, 6 September 2012 08:47:24 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:45 UTC