I have a JavaFX application with a WebView that loads a local HTML page. That works fine. However, I would like that HTML page to include a script that references an external JavaScript file such that those functions can then be invoked by my JavaFX application to update the displayed Web page. I have found the Oracle tutorial, but it uses a script embedded inside the HTML page where I'd like to use an external JS file. Also, can my HTML file invoke a script when it's loaded?
I can call JavaScript functions if they are declared inside the HTML file, but how can I use an external JavaScript file?