W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2013

RE: Standardizing console APIs: Where?

From: François REMY <francois.remy.dev@outlook.com>
Date: Wed, 27 Feb 2013 19:55:31 +0100
Message-ID: <DUB002-W1535B757015CEB5353DD749A5FD0@phx.gbl>
To: Thaddee Tyl <thaddee.tyl@gmail.com>, Brian Kardell <bkardell@gmail.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>
CC: es-discuss <es-discuss@mozilla.org>
> 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. 		 	   		  
Received on Wednesday, 27 February 2013 18:56:00 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:08 UTC