W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2011

Re: removing multiple inheritance

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 16 Jun 2011 02:49:13 +0000 (UTC)
To: Cameron McCormack <cam@mcc.id.au>
cc: Travis Leithead <Travis.Leithead@microsoft.com>, public-script-coord@w3.org
Message-ID: <Pine.LNX.4.64.1106160240360.14203@ps20323.dreamhostps.com>
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
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Thursday, 16 June 2011 02:49:45 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:03 UTC