[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:22:21 PDT 2009


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





--- Comment #5 from Timothy Hatcher <timothy at hatcher.name>  2009-10-31 10:22:20 PDT ---
To force object output for DOM nodes, arrays and anything else, use the dir()
function. A poorly named API that matches Firebug.

So this will do what you want:

  > dir(x)

  Array
       0: 1
       1: 2
       2: 3
       a: 4

But I tend to agree, we should only do array formatting when we are positive
about it.

Maybe we should look for any non-numeric enumerable properties. If there are
any, we just use object formatting. (This might be too slow for large arrays
though…)

-- 
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