[WebIDL] Value of [[Class]] on host objects

Anne van Kesteren
(in http://www.w3.org/mid/op.t3t40low64w2qv@annevk-t60.oslo.opera.com):
> Maybe the draft already says something about this, but I couldn't find 
> it. I think it would be good if there was a way in the IDL to say what an 
> object stringifies to. The Window object becomes "[object Window]"
…
> The tricky part here is objects implementing multiple interfaces, such
> as Document and DocumentSelector, but in those cases the specification
> editors should probably ensure there are no strange things.

I’ve now specified particular values for [[Class]] on host objects
(regular ones and host exception objects).  For host objects, it is the
identifier of the “primary prototype interface” (which, if you put a
[PrototypeRoot] extended attribute appropriately on Node and Event, is
the name of the “main” interface).  If there’s no primary prototype
interface, no particular value is required.  For exception host objects,
it’s the identifier of the exception.

I’ve left [[Class]] on interface objects and interface prototype objects
undefined (which was discussed later on in the thread that starts with
Anne’s mail above).

-- 
Cameron McCormack ≝ http://mcc.id.au/

Received on Wednesday, 12 November 2008 06:32:45 UTC