Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8090690

WebView java objects set on 'window' via setMember(String, Object) are lost after a page is loaded

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 7u15
    • Fix Version/s: tbd
    • Component/s: javafx
    • Labels:
      None
    • Subcomponent:
      web

      Description

      Looks like

      JSObject jsobj = (JSObject) webEngine.executeScript("window");
      jsobj.setMember("java", new Bridge());

      only works after the document has been loaded.

      This prevents using java objects during the initial page load

      <!DOCTYPE html>
      <html>
          <head>
              <script>
                - java objects can not be used here
              </script>
           <body>
              <script>
                - or here -
              </script>
          </body>
      </html>


      Same discussion on the comments here: https://blogs.oracle.com/javafx/entry/communicating_between_javascript_and_javafx



        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              atechnolojfx Anahata Technologies (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Imported: