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

Re: [WebIDL] prototype chains, multiple inheritance, mixin interfaces

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Fri, 19 Nov 2010 22:09:37 -0500
Message-ID: <4CE73BF1.5030308@mit.edu>
To: public-script-coord@w3.org
On 11/19/10 4:39 PM, Cameron McCormack wrote:
> One issue I thought of since then is what to do if mixin interfaces want
> to define constants, and they want them to appear on an interface object
> with the abstract interface’s name?  This comes up in SVG, for example:

A related issue.  What happens if a single mixin interface wants to mix 
in into multiple concrete interfaces?  Think nsIDOMEventTarget, unless 
some interface inheritance chains get changed.

> An alternative would be to just require that the SVGZoomAndPan object
> exists with these constants as a legacy-required thing, and that for
> future (other) specs, script authors would just need to look up the
> constants on the concrete interface being mixed in to.

Which one, though?  It's not obvious that looking up Window.something is 
the same as Node.something if we have an interface that mixes into both....

I don't think this is a blocking issue, but did want to mention it.

(Well, the other issue is that if you want to override the default 
behavior of a mixin method that mixes into lots of places then you have 
to do it in all those places separately... this may also be ok.)

Received on Saturday, 20 November 2010 03:10:11 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:02 UTC