Closed
Bug 1359578
Opened 9 years ago
Closed 6 years ago
console.table() compatibility and output differences between Firefox and Chrome
Categories
(DevTools :: Console, defect, P3)
DevTools
Console
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: sheppy, Unassigned)
References
Details
(Whiteboard: [console-spec])
Attachments
(2 files)
Chrome and Firefox currently interpret the parameters passed into console.table() differently. Enough so that this example, which works in Firefox, fails in Chrome. Additionally, in Firefox, the version which is adjusted to work in Chrome has substantially different output when used on Firefox than the original form (the columns and rows are pivoted).
Here's the original example taken from MDN:
console.table(["apples", "oranges", "bananas"]);
This doesn't work on Chrome. Changing it to the following works on Chrome:
console.table([["apples", "oranges", "bananas"]]);
In the screenshots I will attach, you'll see the output of each version of this in each of the two browsers. console.table-firefox shows the output on Firefox while console.table-chrome shows the output in Chrome.
The questions: whose syntax is currently closer to what the spec suggests? Are the two implementations likely to come into alignment at some point in the relatively near future?
Blocking documentation bug 1357343.
| Reporter | ||
Comment 1•9 years ago
|
||
| Reporter | ||
Comment 2•9 years ago
|
||
In each of the screenshots, the top is the syntax:
console.table([["apples", "oranges", "bananas"]]);
Which works in both browsers.
The bottom is:
console.table(["apples", "oranges", "bananas"]);
This works only in Firefox.
Comment 3•9 years ago
|
||
> The questions: whose syntax is currently closer to what the spec suggests? Are the two implementations likely to come into alignment at some point in the relatively near future?
Here's a link to the spec discussion (which doesn't yet answer these questions): https://github.com/whatwg/console/issues/21.
And here's a list of known differences: https://github.com/whatwg/console/blob/master/NOTES.md#consoletable---printing-of-strings.
Priority: -- → P3
Whiteboard: [console-spec]
Updated•7 years ago
|
Product: Firefox → DevTools
Comment 5•6 years ago
|
||
Thanks for confirming, chugylo !
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•