From 13eeb9aa6de304ac76c5e468778ab315f8e663a3 Mon Sep 17 00:00:00 2001 From: Shagen Ogandzhanian Date: Mon, 3 Jan 2022 17:17:55 +0100 Subject: [PATCH] canvasNoSkikoTest: Setting attributes in builder rather than in DomSideEffect --- web/core/src/jsTest/kotlin/skiko/CanvasSkikoTests.kt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/web/core/src/jsTest/kotlin/skiko/CanvasSkikoTests.kt b/web/core/src/jsTest/kotlin/skiko/CanvasSkikoTests.kt index 040b710e5d..cf7e1debeb 100644 --- a/web/core/src/jsTest/kotlin/skiko/CanvasSkikoTests.kt +++ b/web/core/src/jsTest/kotlin/skiko/CanvasSkikoTests.kt @@ -25,14 +25,12 @@ class CanvasSkikoTests { @Test fun canvasNoSkikoTest() = runTest { composition { - Canvas { -// attr("height", "60") -// attr("width", "60") + Canvas({ + attr("height", "60") + attr("width", "60") + }) { DomSideEffect { canvas -> - canvas.width = 60 - canvas.height = 60 - val ctx = canvas.getContext("2d") as CanvasRenderingContext2D ctx.beginPath() ctx.rect(10.0, 10.0, 30.0, 30.0)