Re: [webcomponents]: Platonic form of custom elements declarative syntax

On 4/11/13 12:55 PM, Boris Zbarsky wrote:
> On 4/11/13 12:50 PM, Allen Wirfs-Brock wrote:
>> Yes ES6 has "class-side" inheritance
>
> OK.  Should we be doing that with WebIDL interface objects, perhaps?  It
> would certainly make sense to me to do that, as long we we don't run
> into web compat issues.

I've filed https://bugzilla.mozilla.org/show_bug.cgi?id=860841 with a 
patch to do this.  The specific behavior I'm implementing is that the 
prototype of the interface object for interface X is the interface 
object of the nearest ancestor of X that has one, and Function.prototype 
if there is no such ancestor.

So for example, with that patch Object.getPrototypeOf(HTMLElement) == 
Element, and Object.getPrototypeOf(XMLHttpRequest) == EventTarget.

Note that this doesn't quite match the proto chain, because 
Object.getPrototypeOf(XMLHttpRequest.prototype) is the prototype object 
for the XMLHttpRequestEventTarget interface, but that interface is 
[NoInterfaceObject].

-Boris

Received on Thursday, 11 April 2013 19:04:49 UTC