KevinnZou / compose-webview-multiplatform

WebView for JetBrains Compose Multiplatform
https://kevinnzou.github.io/compose-webview-multiplatform/
Apache License 2.0
530 stars 69 forks source link

KCEF initialization is not covered in the documentation #101

Closed SPC-code closed 10 months ago

SPC-code commented 10 months ago

I've encountered problem on Windows. The WebView shows blank screen for all possible usage scenarios. After some debugging, I found the problem: KCEF returns the state NEW and webview then just shows nothing without errors. In order to fix that I had to add

KCEF.init(
    builder = {
        progress {
            onDownloading {
                println("Download progress: $it%")
            }
        }
        release(true)
    }
)

at the start of the application. It is covered here. But webview does not seem to do any initialization or check if the framework is initialized.

I think that the component should check if the client is available and initialize it properly. In any case, the initialization should be covered in the documentation.

KevinnZou commented 10 months ago

@SPC-code Thanks for your feedback. Have you checked this doc for desktop setup?

SPC-code commented 10 months ago

Thanks, I've missed it. I mostly tried to work with samples.

KevinnZou commented 10 months ago

I will place the reminder in a more noticeable location to prevent it from being overlooked.