W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2010

Re: Thoughts on ES5 binding modifications (was: RE: Java bindings generated from Web IDL)

From: Olli Pettay <Olli.Pettay@helsinki.fi>
Date: Sun, 31 Oct 2010 22:59:12 +0100
Message-ID: <4CCDE6B0.1050009@helsinki.fi>
To: Travis Leithead <travil@microsoft.com>
CC: Cameron McCormack <cam@mcc.id.au>, "Mark S. Miller" <erights@google.com>, Shiki Okasaka <shiki@google.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>, Adrian Bateman <adrianba@microsoft.com>
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)?


-Olli
Received 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