Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add GwtCanvas and dom-classes #1

Merged
5 commits merged into from
May 20, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Next Next commit
use typealiases for File and FileList
  • Loading branch information
sanek325 committed May 20, 2019
commit ca97e3852e46a8ff6136479825583c3a24e32a6b
14 changes: 1 addition & 13 deletions base/src/jsMain/kotlin/base/domCore/js/File.kt
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
package jetbrains.datalore.base.domCore.js

class File(private val file: org.w3c.files.File) {
val name: String
get() = file.name

val size: Int
get() = file.size

companion object {
fun create(file: org.w3c.files.File?): File? {
return if (file != null) File(file) else null
}
}
}
typealias File = org.w3c.files.File
9 changes: 1 addition & 8 deletions base/src/jsMain/kotlin/base/domCore/js/FileList.kt
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
package jetbrains.datalore.base.domCore.js

class FileList(private val fileList: org.w3c.files.FileList) {
val length: Int
get() = fileList.length

fun item(index: Int): File? {
return File.create(fileList.item(index))
}
}
typealias FileList = org.w3c.files.FileList