Skip to content

Commit f927555

Browse files
author
Sergey Mashkov
committed
Workaround undefined type on NodeJS (#159)
Making these three functions inline eliminates element types usages and fixes the issue
1 parent f7aa4d7 commit f927555

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/jsMain/kotlin/compatibility-js.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ import kotlinx.html.*
44
import org.w3c.dom.*
55

66
@Deprecated("Use legend instead", ReplaceWith("legend(classes, block)"))
7-
fun TagConsumer<HTMLElement>.legEnd(classes : String? = null, block : LEGEND.() -> Unit = {}) : HTMLLegendElement = legend(classes, block)
7+
inline fun TagConsumer<HTMLElement>.legEnd(classes : String? = null, crossinline block : LEGEND.() -> Unit = {}) : HTMLLegendElement = legend(classes, block)
88

99
@Deprecated("Use htmlObject instead", ReplaceWith("htmlObject(classes, block)", "kotlinx.html.js.htmlObject"))
10-
fun TagConsumer<HTMLElement>.object_(classes : String? = null, block : OBJECT.() -> Unit = {}) : HTMLElement =
10+
inline fun TagConsumer<HTMLElement>.object_(classes : String? = null, crossinline block : OBJECT.() -> Unit = {}) : HTMLElement =
1111
htmlObject(classes, block)
1212

1313
@Deprecated("Use htmlVar instead", ReplaceWith("htmlVar(classes, block)", "kotlinx.html.js.htmlVar"))
14-
fun TagConsumer<HTMLElement>.var_(classes : String? = null, block : VAR.() -> Unit = {}) : HTMLElement =
15-
htmlVar(classes, block)
14+
inline fun TagConsumer<HTMLElement>.var_(classes : String? = null, crossinline block : VAR.() -> Unit = {}) : HTMLElement =
15+
htmlVar(classes, block)

0 commit comments

Comments
 (0)