Standardizing console APIs: Where?

François REMY at
Wed Feb 27 10:55:31 PST 2013

> In browsers, when logging an object, you can actually click on an arrow
> to browse through all its properties.
> Serializing the whole thing on every single console.log, when those
> happen in a loop,
> would make the debugging experience a nightmare, performance-wise.

True but we may expect the string representation to be exact while the details are loaded when expanded only.

The clickable behavior is an extension to the Console API (which is text-only). I agree that this part should not be standardized.

However, IE has a console.clear() function that I find useful, it should probably be standardized. I think we should also get console functions bound to the console object as it was already proposed in this thread. The string output format should probably be better defined, too.

All in all, even if we limit the scope to text functions, there's still room for compatibility improvement. I wonder if the people working on navigation timing APIs wouldn't agree to work on this since the console API has profiling capabilities... which probably could be improved vastly.

BTW it should be noted that some browsers only enable logging on a page if the console window is open (or was opened at some point in the page lifetime). This is maybe a way to avoid the slow down that more powerful logging tools could cause. 		 	   		  

More information about the es-discuss mailing list