-
Bug
-
Resolution: Fixed
-
P3
-
fx2.0
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();
}
}
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();
}
}