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

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.)

-Boris

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