Re:Laconic: A Sane Method of Generating DOM Content in JavaS...
by mkmcdonald on Thursday April 26, 2012 @11:46AM
(#3894449)
That may be, but it's poison for host objects. In older IE and Opera builds, `"[object Object]"` comes up often, even for host methods.
This is because there is no defined standard for `toString` results of host objects.
Object.prototype.toString ( ) When the toString method is called, the following steps are taken:
1. If the this value is undefined, return "[object Undefined]".
2. If the this value is null, return "[object Null]".
3. Let O be the result of calling ToObject passing the this value as the argument.
4. Let class be the value of the [[Class]] internal property of O.
5. Return the String value that is the result of concatenating the three Strings "[object ", class, and "]".