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

Regression: JSObject.removeMember doesn't work

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: fx2.0
    • Fix Version/s: fx2.0
    • Component/s: javafx
    • Subcomponent:
      web

      Description

      JSObject.removeMember doesn't work.
      Discovered with Presidio b41.

      Please try the following application:

      import com.sun.webpane.webkit.JSObject;
      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.web.WebEngine;
      import javafx.scene.web.WebView;
      import javafx.stage.Stage;

      public class Main extends Application {
          
          /**
           * @param args the command line arguments
           */
          public static void main(String[] args) {
              Application.launch(args);
          }

          @Override
          public void start(Stage stage) throws Exception {
              WebView wv = new WebView();
              WebEngine e = wv.getEngine();
              
              JSObject strO = (JSObject) e.executeScript("new String('test me')");
              strO.setMember("newmember", "I am new member, and I'm here");
              strO.removeMember("newmember");
              Object o = strO.getMember("newmember"); // Should be undefined!
              System.out.println(o);
                      
              stage.setScene(new Scene(wv));
              stage.show();
          }
      }

        Attachments

          Activity

            People

            • Assignee:
              pbothner Per Bothner (Inactive)
              Reporter:
              ilatyshe Irina Grineva (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: