I'm playing around with the JavaFX WebView, which shows some simple html pages. I have added a Java class, and want to call methods on that class from JavaScript. This works, I can do something like this in an html page:
function test() {
let todo = manager.getTodo();
document.getElementById("todo-description").innerHTML = todo.getDescription();
}
However, if I misspell the method "getTodo()", e.g. "gettodo()" or whatever, I don't get any error messages. If I just have JavaScript without calling on a Java object, but make some mistake caught at runtime, I don't get errors anywhere. The script just doesn't do anything (which makes sense). I would get an error in the console, in an actual browser.
Is there a way to get runtime errors printed to the Java console, i.e. System.out? I can log messages, but that's an explicit method call, I have to do.