webfx-project / webfx

A JavaFX application transpiler. Write your Web Application in JavaFX and WebFX will transpile it in pure JS.
https://webfx.dev
Apache License 2.0
317 stars 21 forks source link

openjfx-web not supported? #34

Open FelipeAumannRS opened 3 months ago

FelipeAumannRS commented 3 months ago

Tried to load an url using WebEngine, although it does not work.

Interesting enough, after excluding webView from code and replacing it with any javafx ui component (let's say a label), and then running " mvn package", the index.html is automatically refreshed, showing my label in the browser.

It's said that WebFX has 80% compatibility with openjfx-web, although it's not possible to do anything with this dependency in a WebFX context.

salmonb commented 3 months ago

Yes, WebFX supports the JavaFX WebView and WebEngine, but the API coverage is not complete (estimated at 80%).

If your issue is at compile time, try to run webfx update at your project root level to fix it.

If your issue is at runtime, do you see some useful information in the browser console? Can you find the iFrame in the DOM and check it is set with the url you provided?

Be aware that the browser sandbox is more restrictive than OpenJFX. It's possible you are facing CORS issues (while OpenJFX doesn't care about CORS).

Don't hesitate to join the WebFX Discord chat if you need quick support (GitHub didn't notify me about this issue for some reason)