Browse Source

Unsafe cast while element creation

FUN_INTERFACE
Shagen Ogandzhanian 3 years ago
parent
commit
0ab8e21ca2
  1. 2
      web/core/src/jsMain/kotlin/androidx/compose/web/elements/Base.kt

2
web/core/src/jsMain/kotlin/androidx/compose/web/elements/Base.kt

@ -99,7 +99,7 @@ private object DomProvider {
}
private open class ElementBuilderImplementation<TElement : Element>(private val tagName: String) : ElementBuilder<TElement> {
override fun create(): TElement = DomProvider.get(tagName).cloneNode() as TElement
override fun create(): TElement = DomProvider.get(tagName).cloneNode().unsafeCast<TElement>()
}
fun interface ElementBuilder<TElement : Element> {

Loading…
Cancel
Save