Calling JavaFX code from JavaScript