Browse Source

Depending on Skiko directly

with_mpp_example
Shagen Ogandzhanian 3 years ago
parent
commit
4af6f9daa1
  1. 1
      web/core/build.gradle.kts
  2. 5
      web/core/src/jsMain/kotlin/org/jetbrains/compose/skiko/skiko.kt

1
web/core/build.gradle.kts

@ -24,6 +24,7 @@ kotlin {
dependencies {
implementation(compose.runtime)
implementation(kotlin("stdlib-common"))
implementation("org.jetbrains.skiko:skiko:0.0.0-SNAPSHOT")
}
}

5
web/core/src/jsMain/kotlin/org/jetbrains/compose/skiko/skiko.kt

@ -7,7 +7,10 @@ package org.jetbrains.compose.web.skiko
import org.jetbrains.compose.web.dom.ElementScope
import org.w3c.dom.HTMLCanvasElement
import org.jetbrains.skiko.wasm.onWasmReady
fun ElementScope<HTMLCanvasElement>.ping() {
println("PING!!!")
onWasmReady {
println("PONG!!!")
}
}
Loading…
Cancel
Save