Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add console.log() %c support for parity with browsers, Deno, and Bun #52350

Open
jcbhmr opened this issue Apr 3, 2024 · 0 comments · May be fixed by #49205
Open

Add console.log() %c support for parity with browsers, Deno, and Bun #52350

jcbhmr opened this issue Apr 3, 2024 · 0 comments · May be fixed by #49205
Labels
console Issues and PRs related to the console subsystem.

Comments

@jcbhmr
Copy link
Contributor

jcbhmr commented Apr 3, 2024

would be fixed by #49205

My attempt at a compat table of ANSI and %c:

%c ANSI
Node.js ☑️
Deno ☑️ ☑️
Bun ☑️ ☑️
Chrome ☑️ ☑️
Firefox ☑️
Safari ☑️ ?

Why this would be a good idea:

  • Feature parity with other desktop JavaScript runtimes like Deno and Bun
  • Allow documentation authors to recommend using %c instead of ANSI for more compatibility without "%c works everywhere except Node.js" clauses
  • %c is ignored in unsupported environments (like current Node.js) whereas ANSI causes jargon to be printed (particularly in Firefox). Thus, encouraging %c is more "progressive enhancement" or "graceful degradation" than ANSI ??

basically just "everyone else is doing it, so it's probably a good idea to conform to what users expect"

previous issue #29605

@jcbhmr jcbhmr linked a pull request Apr 3, 2024 that will close this issue
@VoltrexKeyva VoltrexKeyva added the console Issues and PRs related to the console subsystem. label Apr 3, 2024
@jcbhmr jcbhmr changed the title Add console.log() %c support for parity with Bun, Deno, and browsers Add console.log() %c support for parity with browsers, Deno, and Bun May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
console Issues and PRs related to the console subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants