Config Kotlin 1.1.4

This commit is contained in:
2017-09-03 12:08:10 +02:00
parent 30c360e4cc
commit 2682693978
9 changed files with 21 additions and 10 deletions

View File

@@ -2,11 +2,19 @@ package nl.astraeus.komp
import kotlinx.html.DIV
import kotlinx.html.FORM
import kotlinx.html.SPAN
import kotlinx.html.TagConsumer
import kotlinx.html.dom.create
import org.w3c.dom.HTMLElement
import kotlin.browser.document
fun SPAN.include(component: Komponent) {
val result = component.render(this.consumer as TagConsumer<HTMLElement>)
component.element = result
Komponent.define(result, component)
}
fun DIV.include(component: Komponent) {
val result = component.render(this.consumer as TagConsumer<HTMLElement>)