Package-level declarations

Types

Link copied to clipboard
@Serializable
data class Event(val type: String, val retrieved: JsonElement = JsonNull)

Corresponds to a JavaScript event object.

Link copied to clipboard
interface EventGenerator<T>

Something that event listeners can be attached to, such as an kweb.Element or a kweb.html.Document

Link copied to clipboard
@Serializable
data class KeyboardEvent(val type: String, val detail: Long, val key: String, val altKey: Boolean, val ctrlKey: Boolean, val code: String, val location: Int, val metaKey: Boolean, val shiftKey: Boolean, val locale: String? = null, val isComposing: Boolean, val retrieved: JsonElement = JsonNull)

Corresponds to a JavaScript event object.

Link copied to clipboard
@Serializable
data class MouseEvent(val type: String, val detail: Long, val altKey: Boolean, val button: Int, val buttons: Int, val clientX: Float, val clientY: Float, val ctrlKey: Boolean, val metaKey: Boolean, val movementX: Int? = null, val movementY: Int? = null, val region: String? = null, val screenX: Int, val screenY: Int, val pageX: Float, val pageY: Float, val offsetX: Float, val offsetY: Float, val shiftKey: Boolean, val x: Float = clientX, val y: Float = clientY, val retrieved: JsonElement = JsonNull)

Corresponds to a JavaScript event object.

Link copied to clipboard
Link copied to clipboard
class OnReceiver<T : EventGenerator<T>>(val source: T, retrieveJs: String? = null, val preventDefault: Boolean)

Functions

Link copied to clipboard
fun main()