aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/panel/Root.kt10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/Root.kt b/src/main/kotlin/pl/treksoft/kvision/panel/Root.kt
index c206ea02..7d06428a 100644
--- a/src/main/kotlin/pl/treksoft/kvision/panel/Root.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/panel/Root.kt
@@ -218,9 +218,10 @@ class Root : SimplePanel {
* @param fixed if false, the container is rendered with Bootstrap "container-fluid" class,
* otherwise it's rendered with "container" class (default is false)
* @param init an initializer extension function
+ * @return the created Root container
*/
- fun Application.root(id: String, fixed: Boolean = false, init: Root.() -> Unit) {
- Root(id, fixed, init)
+ fun Application.root(id: String, fixed: Boolean = false, init: Root.() -> Unit): Root {
+ return Root(id, fixed, init)
}
/**
@@ -229,9 +230,10 @@ class Root : SimplePanel {
* @param fixed if false, the container is rendered with Bootstrap "container-fluid" class,
* otherwise it's rendered with "container" class (default is false)
* @param init an initializer extension function
+ * @return the created Root container
*/
- fun Application.root(element: HTMLElement, fixed: Boolean = false, init: Root.() -> Unit) {
- Root(element, fixed, init)
+ fun Application.root(element: HTMLElement, fixed: Boolean = false, init: Root.() -> Unit): Root {
+ return Root(element, fixed, init)
}
}