https://github.com/kotlin/kotlinx-browser
Kotlin browser API
https://github.com/kotlin/kotlinx-browser
browser document-object-model kotlin kotlinx
Last synced: 7 months ago
JSON representation
Kotlin browser API
- Host: GitHub
- URL: https://github.com/kotlin/kotlinx-browser
- Owner: Kotlin
- License: apache-2.0
- Created: 2020-01-20T10:45:39.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2025-03-11T09:36:52.000Z (11 months ago)
- Last Synced: 2025-06-08T15:05:19.972Z (8 months ago)
- Topics: browser, document-object-model, kotlin, kotlinx
- Language: Kotlin
- Size: 236 KB
- Stars: 153
- Watchers: 25
- Forks: 12
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kotlinx-browser
[](https://kotlinlang.org/docs/components-stability.html)
[](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
[](http://www.apache.org/licenses/LICENSE-2.0)
[](http://kotlinlang.org)
[](https://kotlinlang.slack.com/archives/CDFP59223)
[](https://teamcity.jetbrains.com/viewType.html?buildTypeId=KotlinTools_KotlinxDatetime_Build_All&guest=1)
Kotlin WasmJS browser API
A Kotlin library for working with browser declarations in WasmJs.
This library contains is a replacement for browser declarations, which planned to be removed from Kotlin WasmJS standard library.
See [Using in your projects](#using-in-your-projects) for the instructions how to setup a dependency in your project.
## Status
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.
## Requirements
Is required to use:
* Kotlin `1.9.23` or newer
## Using in your projects
> 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 `1.9.23`.
### Gradle
- Add the Maven Central repository if it is not already there:
```kotlin
repositories {
mavenCentral()
}
```
- In multiplatform projects, add a dependency to the wasmJsMain source set dependencies
```kotlin
kotlin {
sourceSets {
wasmJsMain {
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-browser:0.3")
}
}
}
}
```
## Building
The project requires Kotlin 1.9.23 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:
```gradle
./gradlew build
```