binaryage / binaryage/cljs-devtools

Detection of support for custom formatters doesn't work

未关闭
#80 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Clojure
星标
1.1k
派生
51
PR 合并指标
30 天内没有已合并 PR

描述

Hi,

The mechanism used to detect support for custom formatters doesn't work. It will always report that custom formatters are not supported or that support is disabled. This is due to the fact that the detection mechanism relies on the application of a custom formatter when strings are logged to the console. However, custom formatters are not applied when logging strings. They are only applied when logging objects.

Executing the following statements in the console will demonstrate this:

```
window.devtoolsFormatters = [{"header": () => {console.count("formatter"); return null;}}]
console.log("string")
console.log({})
```

You'll see that the counter "formatter" is only increased once, when the last statement is executed. I see the same behavior using both Chrome and Firefox.

贡献指南

这个仓库没有索引到贡献指南

调研方向

Reproduce the issue with the window.devtoolsFormatters and console.log statements shown in the report, using Chrome or Firefox. Locate the detection mechanism that applies a custom formatter during logging and trace how it determines support. Done means detection no longer reports custom formatters as unsupported or disabled when object formatting is available.

由索引模型根据 Issue 内容生成。

评估

技术栈
clojure
领域
tooling
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。