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

[Bindings] What does typeof return for interface objects?

From: Travis Leithead <travil@windows.microsoft.com>
Date: Tue, 18 Mar 2008 09:52:26 -0700
To: "Web APIs WG (public)" <public-webapi@w3.org>
Message-ID: <937543397460F840810FA27D2922880F5BC923CD87@NA-EXMSG-W602.wingroup.windeploy.ntdev.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 16:52:51 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:25 UTC