Is it possible to have a task automatically run after the WebEngine finishes loading? I know I can get a Worker from WebEngine to indicate loading progress, but it seems like repeatedly polling the Worker not an elegant solution (i.e. locking up program until page loads). I know I can do this with a Task, so can I get the Task for WebEngine somehow, and add an execute on complete command?
Is it possible to have a task automatically run after the WebEngine finishes loading?
Share
Sample based on the WebView documentation:
As a lambda expression:
If you only want to listen to the next page load and not every subsequent page load, then stop listening after the page loaded.
To do that, then you can remove the listener (in the listener code) once it has started to execute: