https://kotlinlang.org logo
#compose
Title
# compose
h

Harold Scissors

08/08/2022, 7:39 PM
What would be a good pattern for calling
WebView.evaluateJavaScript()
from Compose, when using UiModels from a ViewModel? The assumption being that the
WebView
is wrapped in an
AndroidView
Should I not attempt to directly reference the webview and instead invoke javacript through the
loadUrl
such as:
webView.loadUrl("javascript:someJsFun()");
6 Views