Closed LaatonWalaBhoot closed 7 months ago
Thank you for your suggestion! There are a few methods to enable dom storage. For Android, there is a setting option available. However, even with dom storage enabled, I tested the provided URL but it still failed. I was also unable to open the URL in the browser. Is it possible for you to provide a different URL that I can test?
Android does expose a boolean to enable dom storage One aspect that I forgot to mention was that the webpage would load initially for a few milliseconds and then turn blank. I had seen the same behavior with the native Android webview and enabling dom storage had fixed it.
https://techcrunch.com/2023/10/06/brave-lays-off-9-of-its-workforce/ The above URL opens fine for example
https://medial.app/terms https://medial.app/privacy-policy Both these URLs show 500 with the message: Cannot read properties of undefined (reading getColorScheme) Adding a screenshot for reference
I would also point out this only happens when running Android build iOS build opens all URLs perfectly. Please let me know if you need anything else. Happy to contribute. Great work on the library!
I really appreciate your help! The new URLs work well and it is true that they fail on the Android side without enabling the dom storage. They also fail on the Desktop side. To solve that problem
For Android, I will add the option in the WebSettings
so that developers can decide whether they need to use the local storage.
For the Desktop, it already supports the dom storage but needs some configuration. You just need to specify the cachePath
in the init process of CEF. An example would be this:
Cef.init(builder = {
installDir = File("jcef-bundle")
settings {
cachePath = File("cache").absolutePath
}
}
For iOS, you need to do nothing because it enables local storage by default so all URLs will work perfectly.
Thank you for your help once again! Feel free to submit a PR directly if you have any future suggestions.
Really appreciate it. Have little to absolutely no idea about Desktop variations I think you have already raised a PR for both. Wanted to discuss this before moving ahead with a PR. Any idea when this will be merged and new version be released?
Hi, I will merge it and release the new version today. Thanks again for your suggestions!
1.4.0 has been released! https://github.com/KevinnZou/compose-webview-multiplatform/releases/tag/1.4.0
Thanks a lot. Really really appreciate it.
`class WebSettings { var isJavaScriptEnabled = true
} `
As you can see there is no support to enable dom storage Which causes some web pages to turn blank. Example url : https://economictimes.indiatimes.com/tech/technology/amazon-launches-first-test-satellites-for-internet-network/articleshow/104223101.cms