Call javafx function from javascript