Conversation
|
@kdroidFilter review please 😄 |
|
You have also fixed the bug from the old one nice 🤣 |
|
@DrUlysses why not using the webMain source set to target both js and wasmJs? |
Because the whole structure should be migrated. Here is the issue for it #34 I'll do it after the merge |
|
Thank you very much, nice work. I'm currently reviewing it, but I've already noticed that the webview state resets when the page is resized. |
|
Thanks! I'll test it and will fix it |
|
I also see that the loading bar is not displayed. |
…fy state management - Remove duplicate message handler registration in WasmJsWebView.injectJsBridge() that caused every JS bridge message to be dispatched twice - Keep single handler in setupJsBridgeForWasm() with strict JSON regex parsing and proper param unescaping - Add removeEventListener cleanup on dispose to prevent memory leaks - Remove unnecessary WasmJsWebViewState intermediate class and WebViewStateAdapter, sync HtmlViewState directly to WebViewState - Replace polling loop (while/delay 100ms) with reactive snapshotFlow for navigation state sync - Simulate loading progress (0.1→0.9) like desktop platform since iframe doesn't expose real progress - Add onLoadStarted callback so direct loadUrl/loadHtml/reload calls properly trigger loading state - Add comments explaining canGoForward=false browser limitation
…cookies Browser document.cookie API does not support URL-specific cookie removal. Log a warning instead of silently deleting all cookies.
The Updater lambda was unconditionally setting iframe.src/srcdoc on every recomposition (triggered by onGloballyPositioned during resize), causing the WebView to lose its state and reload. Track last applied content and skip re-applying when unchanged.
|
I have noticed by me what the cookies are not being set as well |
|
I've fixed the two problems I mentioned above and simplified the code, but it still needs a thorough review. |
Append trailing slash to bare-domain HTTP(S) URLs (e.g. https://example.com → https://example.com/) in WebViewNavigator before the interceptor runs, matching standard browser normalization behavior across all platforms.
|
In the last commit, I normalized the URL in the common code to have similar behavior between the web and other platforms, but I'm not sure if this is correct. |
|
It's a lot of work; I also see that the URL isn't updated in real time if it changes in the webview. it's probably because of cors. |
|
We need to add HTML pages on the github page so we can test it without any problems of cors. |
|
But I can't contribute more than that for now, sorry. |
|
Thanks for checking out a lot! I'll set to draft for now and will notify when it will be more ready |
|
Upon testing I have also found out, what resize in jvm causes the reload of the page (because the loading bar changing there all the time) |
|
Thanks to @Sterta, we have fixed some stuff. But there are some limitations, since the IFrame is being used for the solution:
|
|
@kdroidFilter Have made some changes. Tell please if something else should be done |
|
Thank you very much, I haven't checked yet, could you document in the readme the constraints and differences with other platforms? |
I have used legacy Webview as basis and adjusted formatting as well.
Have added a demo for wasmJs as well.