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

Re: [whatwg] Specification unclear about how HTMLElement.prototype.onscroll's getter/setter should behave for "body" elements

From: Cameron McCormack <cam@mcc.id.au>
Date: Tue, 04 Dec 2012 08:41:39 +1100
Message-ID: <50BD1C93.2090003@mcc.id.au>
To: Boris Zbarsky <bzbarsky@MIT.EDU>
Cc: whatwg <whatwg@lists.whatwg.org>, Ian Hickson <ian@hixie.ch>
On 4/12/12 6:31 AM, Boris Zbarsky wrote:
> It's a similar situation, yes.  But in this case I don't see why you'd
> need an IDL annotation of any sort at all.  If you want the behavior to
> be the same, just don't define onscroll on Bar at all and define the one
> on Foo to special case the two Foo subclasses you care about here.  If
> you don't want it to be the same, the IDL annotation doesn't help you.

I agree.  But if you we really do need a separate namedItem (for bug 
17201) on HTMLPropertiesCollection, then there is no harm in having it 
too, but I would have it not work on other HTMLCollection objects.

So I think my suggested solution for that bug is:

   * Have the definition of HTMLCollection.namedItem include a hook that
     other specifications can override for descendant classes like

   * Do that overriding for HTMLPropertiesCollection.

   * Not define a distinct namedItem on HTMLPropertiesCollection.

I can see that if you did still include a namedItem on 
HTMLPropertiesCollection with its special behaviour, then you could save 
yourself effort by putting an extended attribute on HTMLCollection's one 
(which means "delegate to the subclass") but I don't think it's really 

(I will put the above in the bug.)
Received on Monday, 3 December 2012 22:04:33 UTC

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