- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Mon, 03 Dec 2012 20:11:37 -0500
- 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 getter. > 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 signatures... -Boris
Received on Tuesday, 4 December 2012 01:12:15 UTC