[whatwg] Specification unclear about how HTMLElement.prototype.onscroll's getter/setter should behave for "body" elements
Cameron McCormack
cam at mcc.id.au
Mon Dec 3 13:41:39 PST 2012
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
HTMLPropertiesCollection.
* 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
necessary.
(I will put the above in the bug.)
More information about the whatwg
mailing list