Re: [PrototypeRoot]

On Sat, Mar 7, 2009 at 4:03 PM, Ian Hickson <ian@hixie.ch> wrote:
> On Sat, 7 Mar 2009, Cameron McCormack wrote:
>>
>> 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.
>
> I think it would make sense to exclude [NoPrototypeObject] interfaces from
> consideration here.
>
>
>> 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.
>
> IMHO this is a problem.

What is the 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.

An API based on interfaces (the DOM, for example), can only reflect
one interface (at most0 in the [[Class]].

What is your use case for designing a program around having to know
the [[Class]]?

Garrett

Received on Monday, 9 March 2009 02:47:02 UTC