Browse Source

Preparations for actually embedding

with_mpp_example
Shagen Ogandzhanian 3 years ago
parent
commit
8097f14854
  1. 13
      web/core/src/jsMain/kotlin/org/jetbrains/compose/skiko/skiko.kt
  2. 17
      web/core/src/jsTest/kotlin/skiko/CanvasSkikoTests.kt

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

@ -0,0 +1,13 @@
/*
* Copyright 2020-2021 JetBrains s.r.o. and respective authors and developers.
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE.txt file.
*/
package org.jetbrains.compose.web.skiko
import org.jetbrains.compose.web.dom.ElementScope
import org.w3c.dom.HTMLCanvasElement
fun ElementScope<HTMLCanvasElement>.ping() {
println("PING!!!")
}

17
web/core/src/jsTest/kotlin/skiko/CanvasSkikoTests.kt

@ -0,0 +1,17 @@
package org.jetbrains.compose.web.core.tests
import kotlin.test.*
import org.jetbrains.compose.web.testutils.*
import org.jetbrains.compose.web.dom.*
import org.jetbrains.compose.web.skiko.ping
class CanvasSkikoTests {
@Test
fun canvasSkikoTest() = runTest() {
composition {
Canvas() {
ping()
}
}
}
}
Loading…
Cancel
Save