1 Reply Latest reply: Jan 31, 2013 1:05 PM by aidreamer RSS

    JavaFX 2.2 WebView JavaScript timing problem

      I am currently trying to use the JavaScript to Java interop functionality in the JavaFX 2.2.4 WebView component.
      What I think,what is missing is a way to set set Java objects after the JavaScript environment is created, but before the page is rendered.
      So far it only seems to work after the page is loaded and the page script elements already have been executed.

      The procedure should work this way, to enable support for something like "document.write(javaObj.myStringReturnMethod());":

      1) Init the JavaScript environment.
      2) livecycle event in which JSObject.setMember() can be invoked
      3) WebView component renders the page and evaluates JavaScript parts with access to Java objects set in 2).

      Are there any plans to add this feature?