kvision / pl.treksoft.kvision / Application

Application

abstract class Application

Base class for KVision applications.

Constructors

<init>

Application()

Base class for KVision applications.

Functions

dispose

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

Ending point for an application.

start

open fun start(): Unit

Starting point for an application.

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

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

Extension Functions

createInstance

fun <T> Any?.createInstance(vararg args: dynamic): T

Helper function for creating JavaScript objects from dynamic constructors.

root

fun Application.root(id: String, fixed: Boolean = false, init: Root.() -> Unit): Root

Create new Root container based on ID

fun Application.root(element: <ERROR CLASS>, fixed: Boolean = false, init: Root.() -> Unit): Root

Create new Root container based on HTML element