W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2009

Re: [PrototypeRoot]

From: Ian Hickson <ian@hixie.ch>
Date: Sat, 20 Jun 2009 06:48:37 +0000 (UTC)
To: Cameron McCormack <cam@mcc.id.au>
Cc: WebApps WG <public-webapps@w3.org>
Message-ID: <Pine.LNX.4.62.0906200646490.16244@hixie.dreamhostps.com>
On Sat, 20 Jun 2009, Cameron McCormack wrote:
> Cameron McCormack:
> > > Done:
> > > 
> > >   The value of the internal [[Class]] property of a host object is
> > >   determined as follows:
> > >     * If the host object implements a single interface, then the value
> > >       of the internal [[Class]] property MUST be the identifier of
> > >       that interface.
> 
> Ian Hickson:
> > I think it would make sense to exclude [NoPrototypeObject] interfaces from 
> > consideration here.
> 
> I assume you mean [NoInterfaceObject]?  Is the reasoning for this that 
> [NoInterfaceObject] inerfaces are nearly always “mixins”, and so 
> shouldn’t affect the [[Class]]?

Yes and yes.


> Cameron McCormack:
> > > Note that this still technically does not mean you can guarantee that
> > > the NodeList returned by querySelectorAll() has [[Class]] == "NodeList",
> > > since it could be that that host object implements another interface,
> > > which might be required by another spec, or perhaps just because the
> > > implementation wants to.
> 
> Ian Hickson:
> > IMHO this is a problem. I don't think that UA extensions should affect the 
> > [[Class]], and I think that other specs should have a way (e.g. 
> > [NoPrototypeObject]) of always making sure they don't affect the [[Class]] 
> > of existing stuff.
> 
> Do you still think it would be bad to use [ProtoypeRoot] on interfaces 
> like NodeList, to indicate that it is the “main” interface?  That 
> would be the way, currently, to require a particular [[Class]] that 
> could not be overridden by having a second interface be implemented.

I don't really mind exactly what the solution is; my only concern here 
would be that I'd be throwing [PrototypeRoot] around a lot. (I assume with 
PrototypeRoot that the most-derived interface that inherits from such an 
interface is automatically promoted to being the [[Class]]?)

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Saturday, 20 June 2009 06:49:15 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:31 GMT