Re: [Bindings] stringify

2008-01-02 Thread Jonas Sicking
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.

Re: [Bindings] stringify

2007-12-31 Thread liorean
On Dec 30, 2007 7:19 PM, Cameron McCormack [EMAIL PROTECTED] wrote: You can however use Object.prototype.toString.call() to ensure you are getting Object's version of toString(), and not some overridden version: Object.prototype.toString.call([object Window]) [object String] On

Re: [Bindings] stringify

2007-12-30 Thread Cameron McCormack
Anne van Kesteren: 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

Re: [Bindings] stringify

2007-12-30 Thread Garrett Smith
On Dec 30, 2007 5:49 PM, Cameron McCormack [EMAIL PROTECTED] wrote: Anne van Kesteren: 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

Re: [Bindings] stringify

2007-12-30 Thread Cameron McCormack
Hi Garrett. Garrett Smith: Checking an object's toString return value to try and determine what it is is not a reliable way to check what type of object it is: toString() says nothing about an object's interface, other than the fact that, if no error is thrown, it supports toString(). For

[Bindings] stringify

2007-12-24 Thread Anne van Kesteren
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

Re: [Bindings] stringify

2007-12-24 Thread Boris Zbarsky
Jim Ley wrote: Could you describe the use cases for defining this at all? Interoperability. Specifying that Window stringifies to [object Window] is probably unnecessary (and not true in all UAs anyway). But specifying that, Location stringifies to its .href property is needed (and is