Object.prototype.inspect ?

Tobie Langel tobie.langel at gmail.com
Wed Mar 11 13:00:19 PDT 2009

>> To be useful for debugging, such a method needs to provide a good  
>> default value and be easily overridden for custom objects. I  
>> wouldn't be too keen on overriding a method which the browser  
>> vendor claims to use internally.
> What text in the link you give made you think anything of the sort?  
> I see no use of "internally" or "internal" in that wiki page. You  
> can override toSource just as you can override toString. Doing so in  
> a content window cannot possibly affect the operation of the  
> browser's user interface ("chrome") windows.

Turns out this page was modified... today. See the previous revision  
here: https://developer.mozilla.org/index.php?title=En/Core_JavaScript_1.5_Reference/Global_Objects/Object/ToSource&revision=8

More information about the Es-discuss mailing list