Confirmed users
497
edits
| Line 498: | Line 498: | ||
<dd>Return a string representing the referent, showing its class and any other useful information, without invoking its <code>toString</code> or <code>toSource</code> methods, or running any other debuggee code. The specific string returned is unspecified. (It is better to add functions to <code>Debug.Object.prototype</code> that retrieve the information you need about the object than to depend on details of <code>safeToString</code>'s behavior.) | <dd>Return a string representing the referent, showing its class and any other useful information, without invoking its <code>toString</code> or <code>toSource</code> methods, or running any other debuggee code. The specific string returned is unspecified. (It is better to add functions to <code>Debug.Object.prototype</code> that retrieve the information you need about the object than to depend on details of <code>safeToString</code>'s behavior.) | ||
(Note that simply calling the <code>toString</code> method of a <code>Debug.Object</code> instance applies to instance itself, not its referent, and thus returns something like <code>"[Object Debug.Object]"</code>.) | (Note that simply calling the <code>toString</code> method of a <code>Debug.Object</code> instance applies to the instance itself, not its referent, and thus returns something like <code>"[Object Debug.Object]"</code>.) | ||
</dl> | </dl> | ||