W3C home > Mailing lists > Public > public-webapi@w3.org > March 2008

Resp.: [Bindings] What does typeof return for interface objects?

From: Joćo Eiras <joao.eiras@gmail.com>
Date: Tue, 18 Mar 2008 20:38:37 +0030
Message-ID: <e72b1b360803181308x556bc4dbo54b9f50b90be290a@mail.gmail.com>
To: "Travis Leithead" <travil@windows.microsoft.com>
Cc: "Web APIs WG (public)" <public-webapi@w3.org>

It does not make sense to be only an object, because you can only have
instances of functions and the instanceof operator requires a function
on the right hand side. That ff3 thing might be a regression.

2008/3/18, Travis Leithead <travil@windows.microsoft.com>:
>
> >From the spec...
>
> 4.2.1. Interface object
>
> The interface object for a particular interface has an internal
> [[Prototype]] object whose value is the Object prototype object.
>
> >> So, can infer that the interface object (lets use HTMLDocument) *is an*
> Object? Or is it a Function?
>
> >> ("object" == typeof HTMLDocument) ? "It's an object" : ("function" ==
> typeof HTMLDocument) ? "It's a function" : "What is it?";
>
> >> I see that browsers disagree and that FF3 B4 recently changed to be
> 'object'. Leaving Opera in the wrong?
>
>
Received on Tuesday, 18 March 2008 20:09:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 18 March 2008 20:09:19 GMT