Re: [WebIDL] Interface object prototype and function object

On 10/3/12 11:43 AM, Philippe Le Hegaret wrote:
> In
>   http://dev.w3.org/2006/webapi/WebIDL/
>
> section 4.4.1 says: "The interface object for a given non-callback
> interface is a function object."
>
> section 4 says: "If an object is defined to be a function object, then
> it has characteristics as follows: Its [[Prototype]] internal property
> is the Function prototype object.[...]"
>
> Does this mean that:
>   typeof Document.prototype should return "function" ?
>
> If not, I'm wondering what I'm missing...

It means that "Object.getPrototypeOf(Document) === Function.prototype" 
should test true.

I'm not quite sure what you're missing, because I don't understand how 
you went from "[[Prototype]] internal property" to ".prototype".

-Boris

Received on Wednesday, 3 October 2012 15:57:41 UTC