Sam
05/08/2019, 1:49 PMreturn suspendCoroutine { cont ->
webView.evaluateJavascript( string ) { result ->
cont.resume( result )
}
}
streetsofboston
05/08/2019, 5:38 PMreturn withContext(Dispatchers.Main) {
suspendCoroutine { cont ->
webView.evaluateJavascript(string) { result ->
cont.resume(result)
}
}
}
Sam
05/08/2019, 8:48 PMstreetsofboston
05/08/2019, 9:27 PMsuspendCoroutine
, is called in the same context that called the suspendCoroutine
. But it seems it is indeed called in the same context.Sam
05/09/2019, 2:36 AM