Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Detection of support for custom formatters doesn't work

未关闭
#80 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

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

调研方向

使用 Chrome 或 Firefox,通过报告中所示的 window.devtoolsFormatters 和 console.log 语句重现该问题。定位在日志记录期间应用自定义 formatter 的检测机制,并跟踪它如何确定是否受支持。当对象格式化可用时,检测不再将自定义 formatter 报告为不受支持或已禁用,即表示完成。

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

描述

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.

主要语言
Clojure
星标
1.1k
派生
51
PR 合并指标
30 天内没有已合并 PR

贡献指南

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

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

binaryage/cljs-devtools 的其他 Issue

查看 binaryage/cljs-devtools 的全部 Issue

相似的 Issue

更多 Clojure Issue

把新 issue 发到你的邮箱

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