console.table doesn't work within async function
Reported by
konr...@gmail.com,
Oct 13
|
|||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36 Steps to reproduce the problem: 1. Create async function 2. Make a request to some API using `await` keyword 3. get data from the API 4. try to display these data using console.table What is the expected behavior? Data should be displayed in the console like with console.log What went wrong? Data doesn't display. Did this work before? N/A Chrome version: 69.0.3497.100 Channel: stable OS Version: 6.1 (Windows 7, Windows Server 2008 R2) Flash Version: Code example: https://goo.gl/hu9ka6 NOTE: if you change console.table to console.log, you would be able to see the data.
,
Oct 15
Hi - thanks for filing the issue! It is confirmed.
,
Oct 18
Thanks for the report. In this case, `console.table` fails because the 'tabular data' is the 2nd argument instead of the first. According to the spec [1], we should be using regular log formatting as a fallback in this case. I'll take a look. [1] https://console.spec.whatwg.org/#table
,
Nov 9
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/fc2558d4c867162097a65862a63d8b158a5f6f16 commit fc2558d4c867162097a65862a63d8b158a5f6f16 Author: Erik Luo <luoe@chromium.org> Date: Fri Nov 09 02:56:01 2018 DevTools: improper console.table calls should have fallback Before, console.table would print an empty message when it could not produce a table. Now, it follows the spec, which says to fall back to "logging the argument if it can’t be parsed as tabular". https://console.spec.whatwg.org/#table Bug: 895077 Change-Id: I2e9394127321307b2516050270be6cde2e45e7b3 Reviewed-on: https://chromium-review.googlesource.com/c/1327464 Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org> Commit-Queue: Andrey Lushnikov <lushnikov@chromium.org> Cr-Commit-Position: refs/heads/master@{#606718} [modify] https://crrev.com/fc2558d4c867162097a65862a63d8b158a5f6f16/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-format-table-expected.txt [modify] https://crrev.com/fc2558d4c867162097a65862a63d8b158a5f6f16/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-format-table.js [modify] https://crrev.com/fc2558d4c867162097a65862a63d8b158a5f6f16/third_party/blink/renderer/devtools/front_end/console/ConsoleViewMessage.js
,
Nov 9
|
|||
►
Sign in to add a comment |
|||
Comment 1 by viswa.karala@chromium.org
, Oct 14