Created
October 13, 2020 15:13
-
-
Save DineshSolanki/96ea47a55451c7a0daaa6a0d89e7a678 to your computer and use it in GitHub Desktop.
Gist to show implementation towards FileReader support for Kweb-core https://github.com/kwebio/kweb-core/issues/165
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun InputElement.setAccept(acceptedTypes: String): Unit = element.execute("$jsExpression.accept=\"$acceptedTypes\";") | |
fun InputElement.multiple(isMultiple: Boolean): Unit = element.execute("$jsExpression.multiple=\"$isMultiple\";") | |
//Usage- | |
input(InputType.file).let { | |
it.setAccept("audio/*") | |
it.multiple(true) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment