Issue metadata
Sign in to add a comment
|
DevTools: fix console %o formatting for arrays |
||||||||||||||||||||
Issue descriptionSee: https://github.com/nodejs/node/pull/14558#issuecomment-319724976 The idea is that %o and %O specifiers on console.log() should map to console.log and console.dir formatters, respectively. Currently, we need to update `console.log('%o', [1,2,3])` To format as `[1, 2, 3]` instead of `Array(3)`
,
Sep 28 2017
For reference, I've bisected this regression to an old commit of mine: https://chromium.googlesource.com/chromium/src/+/05dd76a462c939c4dcdcce29cf29f10943ace9f9%5E%21
,
Sep 29 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/71d5ed5b2493fc0d5a32211b2d6bd8b770bc8cf7 commit 71d5ed5b2493fc0d5a32211b2d6bd8b770bc8cf7 Author: Erik Luo <luoe@chromium.org> Date: Fri Sep 29 08:50:39 2017 DevTools: align console %o optimal formatting specifier with spec The console spec says that the %o specifier should produce "optimally useful formatting" as opposed to the %O "generic JavaScript object formatting". To make this distinction clearer and align log() to %o and dir() to %O, this CL will format arrays/objects with previews when using %o. Please see crbug for screenshot. Bug: 751850 Change-Id: I927e1c34667f1d11bc13e98a86d38419b7012940 Reviewed-on: https://chromium-review.googlesource.com/607576 Commit-Queue: Erik Luo <luoe@chromium.org> Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Cr-Commit-Position: refs/heads/master@{#505333} [modify] https://crrev.com/71d5ed5b2493fc0d5a32211b2d6bd8b770bc8cf7/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-message-format-expected.txt [modify] https://crrev.com/71d5ed5b2493fc0d5a32211b2d6bd8b770bc8cf7/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-message-format.js [modify] https://crrev.com/71d5ed5b2493fc0d5a32211b2d6bd8b770bc8cf7/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js
,
Sep 30 2017
|
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 by l...@chromium.org
, Aug 9 201729.3 KB
29.3 KB View Download