Closed getong closed 2 months ago
It seems that, the console
object does not import here.
How can I import javascript console
object here?
There is no console. You have to build it yourself
There is indeed no console object in rquickjs you will have to build it yourself.
Also note that if you call catch
on the result from the trait CatchResultExt
you will get the actual error returned by quickjs which would have told you that console didn't exist. By default exceptions are only stub, you will have to actually retrieve the error from the context to get the full error.
Thanks
The code:
The run result is
I think
console.log("hello world")
is()
, the unit type in rust. But it does not work here.