mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2025-09-06 08:40:19 +00:00
fill changelog and rename selectOptionalFile to selectFileOrNull
This commit is contained in:
@@ -6,7 +6,7 @@ import kotlinx.coroutines.CompletableDeferred
|
||||
import org.w3c.dom.HTMLInputElement
|
||||
|
||||
suspend fun selectFile(
|
||||
inputSetup: HTMLInputElement.() -> Unit = {}
|
||||
inputSetup: (HTMLInputElement) -> Unit = {}
|
||||
): MPPFile {
|
||||
val result = CompletableDeferred<MPPFile>()
|
||||
|
||||
@@ -22,8 +22,8 @@ suspend fun selectFile(
|
||||
return result.await()
|
||||
}
|
||||
|
||||
suspend fun selectOptionalFile(
|
||||
inputSetup: HTMLInputElement.() -> Unit = {},
|
||||
suspend fun selectFileOrNull(
|
||||
inputSetup: (HTMLInputElement) -> Unit = {},
|
||||
onFailure: (Throwable) -> Unit = {}
|
||||
): MPPFile? {
|
||||
val result = CompletableDeferred<MPPFile?>()
|
||||
|
Reference in New Issue
Block a user