aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/utils')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/utils/Snabbdom.kt13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/utils/Snabbdom.kt b/src/main/kotlin/pl/treksoft/kvision/utils/Snabbdom.kt
index 00d7e59a..768ce8aa 100644
--- a/src/main/kotlin/pl/treksoft/kvision/utils/Snabbdom.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/utils/Snabbdom.kt
@@ -157,12 +157,21 @@ inline fun snOpt(noinline block: VNodeData.() -> Unit) = (vNodeData()::apply)(bl
* Internal function.
*/
@Suppress("UnsafeCastFromDynamic")
-internal fun on(widget: Widget): SnOn<Widget> {
+internal fun on(target: Widget): SnOn<Widget> {
val obj = js("{}")
- obj["self"] = widget
+ obj["self"] = target
return obj
}
+/**
+ * @suppress
+ * Internal function.
+ */
+@Suppress("UnsafeCastFromDynamic")
+internal fun emptyOn(): SnOn<Widget> {
+ return js("{}")
+}
+
@Suppress("UnsafeCastFromDynamic", "NOTHING_TO_INLINE")
internal inline fun hooks(): Hooks {
return js("{}")