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

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

From: Cameron McCormack <cam@mcc.id.au>
Date: Wed, 19 Mar 2008 22:04:07 +1100
To: "Web APIs WG (public)" <public-webapi@w3.org>
Message-ID: <20080319110407.GB7430@arc.mcc.id.au>

Ian Hickson:
> Those are two possible options. There's also a third option: allow 
> interfaces to define [[Call]] the same way you allow them to define 
> [[Construct]], thus making this vary on a per-interface basis.

All right.  So since as Maciej points out some interface objects do need
to be callable, something like this should be possible.  (And mandating
that typeof returns 'object' for those that don’t define [[Call]] and
'function' for those that do?  Actually, the spec doesn’t say anything
about typeof at the moment, which I guess it should do given ECMA-262
strictly doesn’t suggest anything for ‘typeof hostObject’.)

Cameron McCormack, http://mcc.id.au/
	xmpp:heycam@jabber.org  ▪  ICQ 26955922  ▪  MSN cam@mcc.id.au
Received on Wednesday, 19 March 2008 11:04:52 UTC

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