From 0b91779a5baf5f78ae616db8f67dcf4d81e839cc Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Sat, 11 May 2019 02:33:48 +0200 Subject: Allow constructing Root containers from HTMLElement objects. --- src/main/kotlin/pl/treksoft/kvision/KVManager.kt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main/kotlin/pl/treksoft/kvision/KVManager.kt') diff --git a/src/main/kotlin/pl/treksoft/kvision/KVManager.kt b/src/main/kotlin/pl/treksoft/kvision/KVManager.kt index faa0b77c..d1a4a8be 100644 --- a/src/main/kotlin/pl/treksoft/kvision/KVManager.kt +++ b/src/main/kotlin/pl/treksoft/kvision/KVManager.kt @@ -29,6 +29,7 @@ import com.github.snabbdom.datasetModule import com.github.snabbdom.eventListenersModule import com.github.snabbdom.propsModule import com.github.snabbdom.styleModule +import org.w3c.dom.HTMLElement import pl.treksoft.kvision.core.Component import pl.treksoft.kvision.utils.isIE11 import kotlin.browser.document @@ -72,6 +73,10 @@ internal object KVManager { return sdPatch(container, vnode) } + internal fun patch(element: HTMLElement, vnode: VNode): VNode { + return sdPatch(element, vnode) + } + internal fun patch(oldVNode: VNode, newVNode: VNode): VNode { return sdPatch(oldVNode, newVNode) } -- cgit