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

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