5.2.15 Fixed thumbnail not loading

This commit is contained in:
tom5079
2022-01-20 15:57:43 +09:00
parent e4fbd21731
commit 994d4b589b
10 changed files with 136 additions and 203 deletions

View File

@@ -66,7 +66,7 @@ suspend fun WebView.evaluate(script: String): String = coroutineScope {
@OptIn(ExperimentalCoroutinesApi::class)
suspend fun WebView.evaluatePromise(
script: String,
then: String = ".then(result => Callback.onResult(%uid, JSON.stringify(result))).catch(err => Callback.onError(%uid, JSON.stringify(error)))"
then: String = ".then(result => Callback.onResult(%uid, JSON.stringify(result))).catch(err => { console.err(err); Callback.onError(%uid, JSON.stringify(err)); })"
): String = coroutineScope {
var result: String? = null