javaFX webview [removed] is fired before loadworker succeeds

前端 未结 3 740
广开言路
广开言路 2021-01-21 22:14

I use a JavaFX webview in my application. With the following code I set a member after the page has been loaded

webEngine.getLoadWorker().stateProperty().addList         


        
3条回答
  •  闹比i
    闹比i (楼主)
    2021-01-21 22:37

    Woks for all (including subsequent) pages: Where "java" is set in JAVA code:

    window.setMember("java", new JavaApplication());
    

    HTML (subsequent) page, keep waiting for 100ms if var "java" is not set (externally by JAVA):

      
    

提交回复
热议问题