binaryage / binaryage/cljs-devtools
Detection of support for custom formatters doesn't work
- Langage dominant
- Clojure
- Étoiles
- 1.1k
- Forks
- 51
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- clojure
- Domaine
- tooling
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 48/100