[Webkit-unassigned] [Bug 38664] Web Inspector: add a "table" method to console, to allow output of tabular data
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jun 1 03:38:30 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=38664
--- Comment #20 from Jan Odvarko <odvarko at gmail.com> 2010-06-01 03:38:28 PST ---
(In reply to comment #17)
> Should the headers param be an object instead of an array?
>
> Say you skip the columns param (pass null) and just use everything the objects have. You then wont know the property order for rthe headers.
>
> So specifying them as an object make the order not matter, and lets you skip some.
>
> var data = [{name: "Mike", age: 30}, {name: "John", age: 5}];
> console.table(data, null, null, {age: "How Old?"})
>
> name How Old?
> ------------
> Mike 30
> John 5
In case the headers argument would be an object, we can merge columns and headers into one:
var data = [{name: "Mike", age: 30}, {name: "John", age: 5}];
console.table(data, "My Family", {prop: "age", label: "How Old?"})
How Old?
--------
30
5
I guess Patrick would like it and it's also ok with me.
Honza
--
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