kvision / pl.treksoft.kvision / Application

Application

(js) abstract class Application

Base class for KVision applications.

Constructors

(js)

<init>

Base class for KVision applications.

Application()

Functions

(js)

dispose

Ending point for an application.

open fun dispose(): Map<String, Any>
(js)

start

Starting point for an application.

open fun start(): Unit

Starting point for an application with the state managed by Hot Module Replacement (HMR).

open fun start(state: Map<String, Any>): Unit

Extension Functions

(js)

root

Create new Root container based on ID

fun Application.root(id: String, containerType: ContainerType = ContainerType.FLUID, addRow: Boolean = containerType != ContainerType.FIXED, init: Root.() -> Unit): Root
fun Application.root(id: String, fixed: Boolean = false, containerType: ContainerType = if (fixed) ContainerType.FIXED else ContainerType.FLUID, addRow: Boolean = !fixed, init: Root.() -> Unit): Root

Create new Root container based on HTML element

fun Application.root(element: HTMLElement, containerType: ContainerType = ContainerType.FLUID, addRow: Boolean = containerType != ContainerType.FIXED, init: Root.() -> Unit): Root
fun Application.root(element: HTMLElement, fixed: Boolean = false, containerType: ContainerType = if (fixed) ContainerType.FIXED else ContainerType.FLUID, addRow: Boolean = !fixed, init: Root.() -> Unit): Root