https://kotlinlang.org logo
#compose-desktop
Title
# compose-desktop
a

Alex Styl

09/20/2023, 1:32 AM
was anyone able to have a nice webview in their app? I did a quick comparison between chrome and jfx and the compose version is very jittery in terms of scroll and some images are not loaded.
😮 1
p

Pablichjenkov

09/20/2023, 2:35 AM
Just stumbled upon this library browsing on GitHub. https://github.com/KevinnZou/compose-webview-multiplatform Is based on jfx too so 🤷🏻
👍 1
a

Alex Styl

09/20/2023, 5:45 AM
tried it out. result is the same
it might have to do with javafx. looking into it
m

Michael Paus

09/20/2023, 8:25 AM
Before you invest a lot of time to get the JFX WebView working I’d first check whether this is actually suitable for the kind of web sites that you want to support because it has several limitations. E.g., you won’t be able to display any web site which uses WebGL and there are more and more web sites which do.
👍 1
a

Alex Styl

09/20/2023, 8:30 AM
I realized that shortly after searching. even without needing WebGL, the pages would load fairly slowly on my mac and they didnt look great. looking into cef now
m

Michael Paus

09/20/2023, 8:35 AM
Yes, that’s partly because they use the JFX rendering engine also for rendering web content. If you could get cef working, that would probably be the better solution from a quality point of view but it pulls in a lot of MBs. There once was a demo project for cef integration in the JetBrains repo.
a

Alex Styl

09/20/2023, 8:36 AM
from what I see in this slack the sample is outdated and doesnt work anymore. didnt really try it out
I found this repo https://github.com/jcefmaven/jcefmaven that brings in cef. it does download the required files but for some odd reason it fails to locate them (even if the file is there)
m

mikehearn

09/20/2023, 11:27 AM
There's a tutorial on how to deploy JCEF apps to the desktop if you use Conveyor here: https://hydraulic.dev/blog/13-deploying-apps-with-jcef.html
t

Tsung Wu

10/14/2023, 10:02 AM
jCef is much better than javafx. I have tested on both.
4 Views