Hello all, I am using a Webview, and I was wonderi...
# announcements
Hello all, I am using a Webview, and I was wondering how to use
to set a javascript variable to a javascript object.
Copy code
val javascriptString = "javascript: someString = {\"key\":\"value\"}"
webView.evaluateJavascript(javascriptString, null)
This is not working. Can someone point me in the right direction?
😶 4
@Kirill Grouchnikov why is this not kotlin? WebView has a method
and the string getting passed in is a string that is representing Javascript code.
That is literally nothing to do with kotlin
@Tony Webview is a part of Android and also exists in Java. If you have more language specific questions people will be more willing to help out. But I’d say this is not necessarily the place to ask questions about how to do things in android unless it truly is Kotlin specific which in this case it is not.