Re: [Bindings] stringify

Anne van Kesteren wrote:
> 
> 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]" 
> and Location stringifies to its href attribute value. 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 don't think the IDL is the right place to put this. Instead it is 
information that should be associated with the objects implemented with 
the interface. One good reason is the one you bring up, that an object 
can implement multiple interfaces. Another is that a interface, such as 
EventTarget, might be implemented by multiple objects with different 
"stringifications".

/ Jonas

Received on Thursday, 3 January 2008 01:02:25 UTC