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

console related support #45

Closed
55cc opened this issue Jan 7, 2021 · 1 comment
Closed

console related support #45

55cc opened this issue Jan 7, 2021 · 1 comment

Comments

@55cc
Copy link

55cc commented Jan 7, 2021

Except for the log function, other functions do not seem to be supported. Moreover, log currently does not support styled output

QuickJS - Type "\h" for help
qjs > console.error("aaa")
TypeError: not a function
    at <eval> (<evalScript>)
qjs > console.log("%caaa","color:red;")
%caaa color:red;
undefined

Is there a possibility of support? Or only limited support, in a way similar to \033[41;37m?

@Alhadis
Copy link

Alhadis commented May 26, 2021

You might want to check this out (which is designed to work the same in every modern JS engine).

console.error = value => std.err.puts(Print(value, {colours: true});

@55cc 55cc closed this as completed Aug 3, 2021
cykoder pushed a commit to cykoder/quickjs that referenced this issue Sep 1, 2023
feat: add OP_debugger and enable get_field2 proto ic
TooTallNate pushed a commit to TooTallNate/quickjs that referenced this issue Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants