Whenever looking for this question on Google I seem to find the same response, but it's either not the answer I'm looking for or I'm lacking a bit of knowledge. What I would like to do is wait for the WebEngine to finish loading before the main thread continues so that I can load my default Google Map API Markers (which must be set in Java as the markers are relative to a number of connections), but I realize doing so would slow down the loading time of the GUI. What would be the best way to make calls to JavaScript without checking if the WebEngine is finished loading each time?
Would it be possible to implement some kind of queue for the JavaScript commands and execute them all once the webEngine is loaded? If so, would that be the best solution? Just trying to figure out how something like this is usually/best handled.