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

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

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 11 Apr 2013 15:04:16 -0400
Message-ID: <51670930.9050408@mit.edu>
To: Allen Wirfs-Brock <allen@wirfs-brock.com>
CC: public-webapps@w3.org, "public-script-coord@w3.org" <public-script-coord@w3.org>
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:51 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:37:48 UTC