[Webkit-unassigned] [Bug 30974] Web Inspector: Pretty print array-like objects

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Oct 31 10:16:26 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=30974





--- Comment #4 from Joseph Pecoraro <joepeck at webkit.org>  2009-10-31 10:16:25 PDT ---
(In reply to comment #2)
> This seems fine to me. What does everyone else think? Joe?

This seems like a good, future-proof way to handle things.

> Personally, it seems like it'd be more consistent to alway print arrays and
> objects the same way; both are indexed collections, but one has a constrained
> set of index values.  

I believe that is what "console.dir" is for (poorly named from the Firebug
API):

  > var x = [1,2,3];
  > x.a = 4;
  > console.dir(x)
  Array
  0: 1
  1: 2
  2: 3
  a: 4


> But I don't have much skin in the game here - I rarely print array-like things
> in the console.  Objects, all the time, but for some reason, almost never
> arrays.

Sometimes printing objects requires a lot of scrolling for property/values
pairs that are really short (multiple could fit on a line). I like the
compactness of the Array printing.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list