Kotlin Web browser API
A Kotlin library for working with browser declarations in Kotlin WasmJs and Kotlin Js targets.
See Using in your projects for the instructions how to setup a dependency in your project.
This library is still in work-in-progress state. Which means that it is not published into public repository and not yet intended to use by end user.
Is required to use:
- Kotlin
2.2.20-Beta2
or newer
Note that the library is experimental, and the API is subject to change.
The library is compatible with the Kotlin Standard Library not lower than 2.2.20-Beta2
.
(with older Kotlin versions one needs to use kotlinx-browser
version 0.3
)
- Add the Maven Central repository if it is not already there:
repositories {
mavenCentral()
}
- In multiplatform projects, add a dependency to common or target source set dependencies:
kotlin {
wasmJs {
browser()
}
js {
browser()
}
sourceSets {
commonMain {
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-browser:0.4")
}
}
}
}
The project requires Kotlin 2.2.20-Beta2 to build and to run tests.
After that, the project can be opened in IDEA and/or built with Gradle.
To build and run tests, execute:
./gradlew build