Detection of support for custom formatters doesn't work
还没有人认领这个 Issue。
评估
调研方向
使用 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
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
binaryage/cljs-devtools 的其他 Issue
-
ROOK 未关闭
难度 5/5 一周以上 新手友好度 5/100
binaryage/cljs-devtools#82 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 48/100
binaryage/cljs-devtools#81 ·
-
难度 4/5 3-5 天 新手友好度 35/100
binaryage/cljs-devtools#79 ·
-
难度 2/5 1-3 小时 新手友好度 35/100
binaryage/cljs-devtools#76 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 35/100
binaryage/cljs-devtools#71 · 1 条评论 · 3 个 reaction ·
查看 binaryage/cljs-devtools 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
-
.Needs Triage .Team/UXWest Priority:P3 Type:New Feature
难度 2/5 1-3 小时 新手友好度 85/100
-
难度 1/5 1 小时以内 新手友好度 90/100
-
难度 1/5 1 小时以内 新手友好度 88/100
-
needs triage
难度 1/5 1 小时以内 新手友好度 90/100