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

JavaScript 2 Java Bridge is broken on MacOS: browser objects are unavailable to scripts

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P2 P2
    • 8
    • 8
    • javafx
    • MacOSX 10.8

    • web

      JavaScript 2 Java Bridge seems to be broken; browser objects are unavailable to scripts.
      The easiest way to reproduce is to run the following code:

      public class Main extends Application {

          WebEngine e;
          @Override
          public void start(Stage stage) throws Exception {
              WebView wv = new WebView();
              e = wv.getEngine();
              Scene scene = new Scene(wv);

              JSObject o = (JSObject) e.executeScript("window;");
              System.out.println(o);
              
              stage.setScene(scene);
              stage.show();
          }
      }

      The same code and tests seem to be working fine on Windows.

            peterz Peter Zhelezniakov
            ilatyshe Irina Grineva (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: