diff options
Diffstat (limited to 'src/main/kotlin/pl/treksoft')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/html/Div.kt | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/html/Div.kt b/src/main/kotlin/pl/treksoft/kvision/html/Div.kt index f71799ac..38dc5817 100644 --- a/src/main/kotlin/pl/treksoft/kvision/html/Div.kt +++ b/src/main/kotlin/pl/treksoft/kvision/html/Div.kt @@ -35,9 +35,15 @@ open class Div( rich: Boolean = false, align: Align? = null, classes: Set<String> = setOf(), - init: (Tag.() -> Unit)? = null + init: (Div.() -> Unit)? = null ) : - Tag(TAG.DIV, text, rich, align, classes, init) { + Tag(TAG.DIV, text, rich, align, classes) { + + init { + @Suppress("LeakingThis") + init?.invoke(this) + } + companion object { /** * DSL builder extension function. |