kvision / pl.treksoft.kvision.utils

Package pl.treksoft.kvision.utils

Interfaces and helper functions for Snabbdom virtual dom implementation and a few useful extension functions.

Types

KvEvent

class KvEvent : CustomEvent

Helper class for defining custom events.

Object

external class Object

JavaScript Object type

Extensions for External Classes

kotlin.Int

kotlin.Pair

kotlin.String

kotlin.js.Date

Properties

ENTER_KEY

const val ENTER_KEY: Int

Keycode of the ENTER key.

ESC_KEY

const val ESC_KEY: Int

Keycode of the ESC key.

auto

val auto: CssSize

Helper property to describe CSS auto value.

Functions

obj

fun obj(init: dynamic.() -> Unit): dynamic

Helper function for creating JavaScript objects.

snAttrs

fun snAttrs(pairs: List<StringPair>): Attrs

Helper function for creating attributes parameters for Snabbdom.

snClasses

fun snClasses(pairs: List<StringBoolPair>): Classes

Helper function for creating classes parameters for Snabbdom.

snOpt

fun snOpt(block: VNodeData.() -> Unit): VNodeData

Helper function for creating object parameters for Snabbdom.

snProps

fun snProps(pairs: List<StringPair>): Props

Helper function for creating properties parameters for Snabbdom.

snStyle

fun snStyle(pairs: List<StringPair>): VNodeStyle

Helper function for creating style parameters for Snabbdom.