WebEngine is a non-visual object capable of managing one Web page at a time. It loads Web pages, creates their document models, applies styles as necessary, and runs JavaScript on pages. It provides access to the document model of the current page, and enables two-way communication between a Java application and JavaScript code of the page.
Questions tagged [javafx-webengine]
264 questions
5
votes
1 answer
How to debug JavaFX webview in 2022
How to debug a JavaFX webview?
I find two ways,
one is to attach external chrome debugger to JavaFX webview.
Another is to inject firebug javascript.
Method#1 seems to use a bit of hacks like set access to private fields etc.
Method#2 depends on…

Ivan Velikanov
- 91
- 4
5
votes
2 answers
JavaFX JSObject stop working after a few minutes?
I'm making a web based app with Java support for some particular requests (e.g. print without choosing the printer everytime) and there is something that id driving me crazy.
I use JavaFX for instantiate the browser object and everything works fine,…

Matt Chad
- 75
- 6
5
votes
1 answer
Loading local JavaScript file in WebView in Java 8u60
Until Java 8u51, the following worked fine:
Have an HTML file containing
Load this HTML file into a WebView
Call a function contained in javascript.js using webView.getEngine().executeScript()
After switching…

Michel Jung
- 2,966
- 6
- 31
- 51
5
votes
1 answer
Why doesn't the JavaScript method execute when inserted into the DOM from JavaFX?
I have a JavaFX application that makes heavy use of a WebView. I am trying to insert an object into the DOM that the JavaScript code can use, and I need these objects to be available as new pages are loaded.
However, when I run the program,…

Cypher
- 2,608
- 5
- 27
- 41
5
votes
1 answer
For JavaFX's WebEngine, how do I get notified of javascript errors?
I'm trying to run some SVG that contains Javascript in JavaFX's WebView. I know some of the scripts I'm trying to run have errors and am trying to figure out how to print them to the console so I can debug them. I've tried the following, but the…

kitfox
- 4,534
- 3
- 17
- 24
5
votes
1 answer
JavaFX WebView can't load certain sites
I'm trying to use JavaFX's WebView to load this site, but all I get is a blank screen. The WebView is working perfectly fine on other sites; it gets 100/100 on ACID3 and loads other HTTPS sites without any problems whatsoever.
I can't find anything…

My other car is a cadr
- 1,429
- 1
- 13
- 21
5
votes
1 answer
JavaFX detecting 404 responses from WebEngine
Using JavaFx WebEngine, how can I detect if there is a 404 page not found error. I have searched but not able to find anything. Any ideas? or Is it possible?

A Paul
- 8,113
- 3
- 31
- 61
5
votes
2 answers
JavaFX WebEngine wait for ajax to complete
I'm developing a data mining application in JavaFX which relies on the WebView (and thus also the WebEngine). The mining happens in 2 steps: first the user uses the UI to navigate to a website in the WebView to configure where interesting data can…

RDM
- 4,986
- 4
- 34
- 43
5
votes
2 answers
JavaFX WebEngine stuck in "Running" state
While using the WebEngine in JavaFX2, I've noticed it sometimes just gets stuck. Assume I were making a crawler that simply finds hyperlinks on a page and then visits them to do the same recursively, keeping track of which links we have visited and…

RDM
- 4,986
- 4
- 34
- 43
4
votes
1 answer
javafx 16 WebEngine Exception "SSL Handshake failed"
I am porting an android app to javaFX for windows deployment, i'm new to javaFX and desktop deployment, but not so new to java.
The app contains a WebView that loads a url obtained from a server via Json (so could be essentially anything).
openJDK…

Tim W
- 91
- 5
4
votes
1 answer
How to edit HTML page (in a webview) from Javafx without reloading the page?
This is how I load my page and I would like to modify it while it's in the browser
WebView browser = new WebView();
WebEngine engine = browser.getEngine();
String cwd = System.getProperty("user.dir");
String name =…

Gilbert Gabriel
- 422
- 2
- 8
- 23
4
votes
1 answer
How to create a JavaFX WebBrowser javascript listener without a Member name
I have been using this snippet for creating js listener in my javafx browser:
engine.getLoadWorker().stateProperty().addListener(
(observable, oldValue, newValue) -> {
if (newValue ==…

Myoch
- 793
- 1
- 6
- 24
4
votes
3 answers
Javafx WebEngine load html file from jar
I am building a project and need to use WebEngine class. So I have 2 projects, MainA and SecondB. The SecondB project is in dependency to MainA, so after building it SecondB becomes a jar file in the MainA libs folder.
Now. I need to open a abc.html…

kamil.rak
- 1,378
- 1
- 14
- 28
4
votes
2 answers
Javafx WebEngine: what really happens in a background worker? UI hangs on loadContent(big HTML document)
From the WebEngine docs:
Loading always happens on a background thread. Methods that initiate
loading return immediately after scheduling a background job. To track
progress and/or cancel a job, use the Worker instance available from
the…

SlumpA
- 882
- 12
- 24
4
votes
1 answer
Javafx: No toolkit found exception
I have added the javafx library in my intellij plugin for adding the jfxwebview.
But when I am trying to create JFXPanel object as
JFXPanle jfxpanel = new JFXPanel();
It is giving the following exception:
No toolkit…

ishan jain
- 681
- 3
- 10
- 27