java - Disable JavaScript from running in JavaFX WebView - Stack Overflow

I would like to know if JavaScript can be disabled in WebView of JavaFX. I have searched the web but ca

I would like to know if JavaScript can be disabled in WebView of JavaFX. I have searched the web but cant get any information about this.

The link in Oracle website says that JavaScript can be enabled and disabled but can't find any documentation.

I would like to know if JavaScript can be disabled in WebView of JavaFX. I have searched the web but cant get any information about this.

The link in Oracle website says that JavaScript can be enabled and disabled but can't find any documentation.

Share Improve this question edited May 31, 2023 at 7:48 Lii 12.1k9 gold badges68 silver badges90 bronze badges asked Dec 3, 2013 at 4:11 Dinesh RavichandranDinesh Ravichandran 3021 gold badge5 silver badges17 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 8

You have to set Javascript disabled on the WebEngine itself that the WebView controls.

WebView browser = new WebView();
WebEngine webEngine = browser.getEngine();
webEngine.setJavaScriptEnabled(false);

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744310746a4567934.html

相关推荐

  • java - Disable JavaScript from running in JavaFX WebView - Stack Overflow

    I would like to know if JavaScript can be disabled in WebView of JavaFX. I have searched the web but ca

    7天前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信