Open khalid64927 opened 1 month ago
[App.kt] val state = rememberWebViewStateWithHTMLFile("index.html") val jsBridge = rememberWebViewJsBridge() val navi = rememberWebViewNavigator()
WebView( state, webViewJsBridge = jsBridge, navigator = navi )
navi.evaluateJavaScript("gogo('from kot')", { msg -> println(msg) })
[index.html]
[Conclusion] Error Message: Uncaught ReferenceError: gogo is not defined Unfortunately, it didn't work for me, so I reverted back to the native webview.
Hi,
This is possibly a feature request. I have a use case where I need to send some json data to webpage being loaded in WebView Composable and possible handle some events coming from loaded web page. There has to be a two way communication between Mobile Platform WebView and Web Platform.
In iOS/Android Native I can achieve this with JavaScript injection.
I was wondering if there is any API available in this library for that.