B4J Question Override Url in Webview

Hi everyone and @Erel can you please check this link: https://www.codota.com/code/java/methods/javafx.scene.web.WebEngine/locationProperty


I saw this code


Code: Copy
WebEngine engine = webview.getEngine();
engine.locationProperty().addListener((observable, oldValue, newValue) -> {
  if (newValue.contains("badsite")) { // replace with your URL checking logic
    Platform.runLater(() -> {
      // Load your block page url
      engine.load("http://example.com"));
    }
  }
});

but I don't know how to make it work for B4J
 
Upvote 0
Back
Top