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

Re: Standardizing console APIs: Where?

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 26 Feb 2013 10:47:58 -0500
Message-ID: <512CD92E.4050204@mit.edu>
To: public-script-coord@w3.org
On 2/26/13 4:47 AM, Jorge Chamorro wrote:
> Safari, firefox, chrome:
>
> (a=[], function() { for (var i=0 ; i<10 ; i++) { a[0]=i; console.log(a); } })()
> [9]
> [9]

This happens because the conversion to string happens at display time, 
not at log() call time.

And that was done because the other option is a serious performance hit 
on pages that issue tens of thousands of log() calls but then only look 
at the several hundred lines still visible in the console...

-Boris
Received on Tuesday, 26 February 2013 15:48:31 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:09 UTC