On 10/21/2010 11:50 PM, Travis Leithead wrote: > OK, looking forward to a discussion around this. In IE9, we are > mixing in interfaces (and inherited interfaces of mixin interfaces) > onto the "implements" target's prototype. > > For example: > > [NoInterfaceObject] interface EventTarget { void > addEventListener(..); }; > > Window implements EventTarget; Node implements EventTarget; > XMLHttpRequest implements EventTarget; > > The above would create three copies of the addEventListener API on > each of Window.prototype, Node.prototype, and > XMLHttpRequest.prototype. We favored this simplicity over the desire > to have a single addEventListener definition that could be configured > to affect all implementing interfaces. The extra redundancy in API > definitions hasn't posed a problem for us yet :) Why couldn't Window, Node and XHR just (effectively) inherit EventTarget so that .prototype.prototype had addEventListener (only one copy)? -OlliReceived on Sunday, 31 October 2010 23:00:40 UTC
This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:03 UTC