diff --git a/web/core/src/jsMain/kotlin/androidx/compose/web/DomApplier.kt b/web/core/src/jsMain/kotlin/androidx/compose/web/DomApplier.kt
index cf232b3d66..e14a1ccf20 100644
--- a/web/core/src/jsMain/kotlin/androidx/compose/web/DomApplier.kt
+++ b/web/core/src/jsMain/kotlin/androidx/compose/web/DomApplier.kt
@@ -80,8 +80,7 @@ class DomNodeWrapper(val node: Node) {
fun updateStyleDeclarations(style: StyleHolder?) {
val htmlElement = node as? HTMLElement ?: return
- // TODO: typed-om-polyfill hasn't StylePropertyMap::clear()
- htmlElement.style.cssText = ""
+ htmlElement.removeAttribute("style")
style?.properties?.forEach { (name, value) ->
setProperty(htmlElement.attributeStyleMap, name, value)
diff --git a/web/core/src/jsTest/kotlin/DomSideEffectTests.kt b/web/core/src/jsTest/kotlin/DomSideEffectTests.kt
index 68c8ef6f5f..1a142c549f 100644
--- a/web/core/src/jsTest/kotlin/DomSideEffectTests.kt
+++ b/web/core/src/jsTest/kotlin/DomSideEffectTests.kt
@@ -29,7 +29,7 @@ class DomSideEffectTests {
}
}
assertEquals(
- expected = "
",
+ expected = "",
actual = root.outerHTML
)
}
@@ -57,7 +57,7 @@ class DomSideEffectTests {
composition { CustomDiv(i) }
assertEquals(
- expected = "",
+ expected = "",
actual = root.outerHTML
)
@@ -75,7 +75,7 @@ class DomSideEffectTests {
message = "onDispose should be called with a previous value"
)
assertEquals(
- expected = "",
+ expected = "",
actual = root.outerHTML
)
}
@@ -97,7 +97,7 @@ class DomSideEffectTests {
}
assertEquals(
- expected = "",
+ expected = "",
actual = root.outerHTML
)
diff --git a/web/core/src/jsTest/kotlin/InlineStyleTests.kt b/web/core/src/jsTest/kotlin/InlineStyleTests.kt
index 086296798f..92b9d25f5c 100644
--- a/web/core/src/jsTest/kotlin/InlineStyleTests.kt
+++ b/web/core/src/jsTest/kotlin/InlineStyleTests.kt
@@ -67,7 +67,7 @@ class InlineStyleTests {
}
assertEquals(
- expected = "text ",
+ expected = "text ",
actual = root.innerHTML
)
@@ -106,7 +106,7 @@ class InlineStyleTests {
waitChanges()
assertEquals(
- expected = "text ",
+ expected = "text ",
actual = root.innerHTML
)
}
@@ -140,7 +140,7 @@ class InlineStyleTests {
val expected = if (isRed) {
"text "
} else {
- "text "
+ "text "
}
assertEquals(
expected = expected,
diff --git a/web/core/src/jsTest/kotlin/elements/AttributesTests.kt b/web/core/src/jsTest/kotlin/elements/AttributesTests.kt
index 864ac5d553..2c905a6932 100644
--- a/web/core/src/jsTest/kotlin/elements/AttributesTests.kt
+++ b/web/core/src/jsTest/kotlin/elements/AttributesTests.kt
@@ -25,7 +25,7 @@ class AttributesTests {
}
assertEquals(
- expected = "label ",
+ expected = "label ",
actual = root.innerHTML
)
}
@@ -38,7 +38,7 @@ class AttributesTests {
}
assertEquals(
- expected = "label ",
+ expected = "label ",
actual = root.innerHTML
)
}
@@ -57,7 +57,7 @@ class AttributesTests {
}
assertEquals(
- expected = "label ",
+ expected = "label ",
actual = root.innerHTML
)
}
diff --git a/web/core/src/jsTest/kotlin/elements/TableTests.kt b/web/core/src/jsTest/kotlin/elements/TableTests.kt
index 6ccfae47f6..c134786455 100644
--- a/web/core/src/jsTest/kotlin/elements/TableTests.kt
+++ b/web/core/src/jsTest/kotlin/elements/TableTests.kt
@@ -137,45 +137,45 @@ class TableTests {
assertEquals(
expected = """
-
- CaptionText
-
-
-
-
+
+ CaptionText
+
+
+
+
-
-
-
-
- First
+
+
+
+
+ First
-
-
-
- A
- B
+
+
+
+ A
+ B
-
-
- Rows
- 1
- 30
- 40
+
+
+ Rows
+ 1
+ 30
+ 40
-
- 2
- 10
- 20
+
+ 2
+ 10
+ 20
-
-
- Totals
-
- 40
- 60
+
+
+ Totals
+
+ 40
+ 60