Re: Standardizing console APIs: Where?

On 2/28/13 1:31 PM, Jorge Chamorro wrote:
> @Zbarsky: I think that those clickable interactive trees and whatnots are über awesome when in interactive mode, when one's typing at the console, but to get them programatically perhaps one should have to call .dir() [1] not .log(), don't you think so?

<shrug>.  I'm just telling you what current console implementations do 
and what presumably authors expect.

Note that console.dir() always produces the "object tree" output in 
Firefox and Chrome at least, while console.log() seems to be a "dwim" 
feature: what it does depends on what got passed.

> If .log() -as it seems- is the printf() [2]

I believe this perception is incorrect.

> When you do a console.log(obj) in a loop as in that example, to observe obj changing, delaying the serialization obviously won't work

Yep.

-Boris

Received on Thursday, 28 February 2013 18:37:56 UTC