Closed dennisdrew closed 2 years ago
Seems fine. You can always delete it or reassign it to no-op. Want to send a PR?
You could also create a console implementation in java/kotlin and then bind it to the engine. It depends where you'd like console.log to go.
you can implement console like this. @Keep interface Log { void log(String msg); void error(String msg); void info(String msg); void warn(String msg); void debug(String msg); }
Log log = new Log() { @Override @Keep public void log(String msg) { //your implementation }
@Override
@Keep
public void error(String msg) {
}
@Override
@Keep
public void info(String msg) {
}
@Override
@Keep
public void warn(String msg) {
}
@Override
@Keep
public void debug(String msg) {
}
};
duktape.set("console", Log.class, log);
We support console
on HEAD and will be in the first Zipline releases.
I get this error when attempting to do a simple
console.log
call.After reading Duktape documentation, I see that it does not provide a
console
implementation. Is that true for duktape-android? If so, can we provide aconsole
implementation?