From d70d7e87b1a5c4e3ac3f983228389e4ee62d18ae Mon Sep 17 00:00:00 2001 From: Shagen Ogandzhanian Date: Wed, 5 Jan 2022 15:01:26 +0100 Subject: [PATCH] So far wasmReady is not composable so I'm skipping this --- .../kotlin/org/jetbrains/compose/skiko/skiko.kt | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/web/core/src/jsMain/kotlin/org/jetbrains/compose/skiko/skiko.kt b/web/core/src/jsMain/kotlin/org/jetbrains/compose/skiko/skiko.kt index d5be2262e0..ebd8088b29 100644 --- a/web/core/src/jsMain/kotlin/org/jetbrains/compose/skiko/skiko.kt +++ b/web/core/src/jsMain/kotlin/org/jetbrains/compose/skiko/skiko.kt @@ -8,16 +8,12 @@ package org.jetbrains.compose.web.skiko import androidx.compose.runtime.Composable import androidx.compose.ui.window.ComposeCanvas import org.jetbrains.compose.web.dom.ElementScope -import org.jetbrains.skiko.wasm.onWasmReady import org.w3c.dom.HTMLCanvasElement @Composable fun ElementScope.skiko(block: @Composable () -> Unit) { -// onWasmReady { - DomSideEffect { canvas -> - ComposeCanvas(canvas).apply { - setContent(block) - } - } -// } + DomSideEffect { canvas -> + val skikoCanvas = ComposeCanvas(canvas) + skikoCanvas.setContent(block) + } } \ No newline at end of file