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: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 03 Dec 2012 20:11:37 -0500
Message-ID: <50BD4DC9.6070500@mit.edu>
To: Ian Hickson <ian@hixie.ch>
Cc: Cameron McCormack <cam@mcc.id.au>, whatwg <whatwg@lists.whatwg.org>
On 12/3/12 7:33 PM, Ian Hickson wrote:
> Note that onerror has a different type on HTMLElement and HTMLBodyElement.

Yes, indeed.  That's the biggest problem with forwarding to Window for 
the HTMLElement.prototype case for "onerror" here: the types are different.

> onscroll is a case where there's really no reason to use a different
> setter, agreed. So I've commented that out (and it's similar friends).
> That still leaves onerror though.

Indeed.  I would have no problem with just having 
HTMLElement.prototype.onerror's setter set an error handler on the body 
itself, like it would on any other HTML element, and likewise for the 

> Per our IRC discussion just now, I think I would propose that when a
> method/setter/getter from a prototype of interface A is called against an
> object that is of an interface B (or one of B's descendants), where B is a
> subclass of A, and B defines its own method/getter/setter with the same
> name, then it should throw.

Hmm.  That, as phrased, is pretty complicated to implement in a 
performant way, if the two methods/getters/setters have the same 

Received on Tuesday, 4 December 2012 01:12:15 UTC

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