Re: removing multiple inheritance

On Thu, 16 Jun 2011, Cameron McCormack wrote:
> I wonder if there is any impediment to having
>   [NoInterfaceObject]
>   interface ModalWindow : Window {
>     readonly attribute dialogArguments;
>     attribute DOMString returnValue;
>   };
> instead.  It does mean there is a separate prototype object, true, but 
> it does simplify the issue and doesn’t require different looking 
> Window prototype objects in different contexts.
> Ian: is this feasible?

The question is more whether UAs want to do it.

Personally I'd rather use a [Supplemental] interface (i.e. one that is 
indistinguishable from the spec just defining Window with the new 
properties), but what matters isn't what I want, it's what gets 
implemented. I'm happy to spec whatever gets implemented. I haven't looked 
closely at how closely the spec matches reality on this particular issue 
since it's not a high priority.

From the authors' perspective, it's just that this is a Window that 
happens to have extra features. I don't think authors look at this as 
Window+ModalWindow, nor would they expect code which works on the Window 
prototype chain to break when faced with the ModalWindow chain just 
because it had a different number of prototypes or anything like that.

BTW, on the EventTarget thing, I think it'd be great if there was some way 
in which we could rig things so that authors could override one object and 
hit _all_ the EventTarget-implementing objects, not just Nodes. I don't 
know if that's really possible in JS, but it certainly seems like what 
authors would want, like the most useful API.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Thursday, 16 June 2011 02:49:45 UTC