Object.toSource() (Method)

Output a string describing the object contents.

Availability:

JavaScript - 1.3
JScript - 3.0
Internet Explorer - 4.0
Netscape - 4.06
Property/method value type:String primitive
JavaScript syntax:-myObject.toSource()

This is an alternative way to deliver a string version of an object's internal values. In this case, it is formatted as an Object literal and can then be used in an eval() function to assign another object.

The exact format of what you see depends on the object being examined.

The result of calling this method is string version of the object formatted as an Object literal.

Warnings: