diff --git a/web/core/src/jsMain/kotlin/org/jetbrains/compose/web/attributes/AttrsScope.kt b/web/core/src/jsMain/kotlin/org/jetbrains/compose/web/attributes/AttrsScope.kt index 756853ce72..c8ad7cb4c2 100644 --- a/web/core/src/jsMain/kotlin/org/jetbrains/compose/web/attributes/AttrsScope.kt +++ b/web/core/src/jsMain/kotlin/org/jetbrains/compose/web/attributes/AttrsScope.kt @@ -27,7 +27,8 @@ typealias AttrsBuilder = AttrsScopeBuilder * are extracted to a separate methods. * */ -interface AttrsScope: EventsListenerScope { +@HtmlAttrMarker +interface AttrsScope : EventsListenerScope { /** * [style] add inline CSS-style properties to the element via [StyleScope] context * diff --git a/web/core/src/jsMain/kotlin/org/jetbrains/compose/web/attributes/HtmlAttrMarker.kt b/web/core/src/jsMain/kotlin/org/jetbrains/compose/web/attributes/HtmlAttrMarker.kt new file mode 100644 index 0000000000..acedce8271 --- /dev/null +++ b/web/core/src/jsMain/kotlin/org/jetbrains/compose/web/attributes/HtmlAttrMarker.kt @@ -0,0 +1,4 @@ +package org.jetbrains.compose.web.attributes + +@DslMarker +annotation class HtmlAttrMarker diff --git a/web/core/src/jsMain/kotlin/org/jetbrains/compose/web/css/StyleScope.kt b/web/core/src/jsMain/kotlin/org/jetbrains/compose/web/css/StyleScope.kt index 095ec99f42..387605d29a 100644 --- a/web/core/src/jsMain/kotlin/org/jetbrains/compose/web/css/StyleScope.kt +++ b/web/core/src/jsMain/kotlin/org/jetbrains/compose/web/css/StyleScope.kt @@ -7,6 +7,7 @@ package org.jetbrains.compose.web.css +import org.jetbrains.compose.web.attributes.HtmlAttrMarker import org.jetbrains.compose.web.internal.runtime.ComposeWebInternalApi import kotlin.properties.ReadOnlyProperty @@ -22,6 +23,7 @@ typealias StyleBuilder = StyleScope * 1. Add inlined css properties to the element (@see [property]) * 2. Set values to CSS variables (@see [variable]) */ +@HtmlAttrMarker interface StyleScope { /** * Adds arbitrary CSS property to the inline style of the element