EventProperties

interface EventProperties<T : Element>

An interface for exposing the events of a component. The type of the underlying HTML element must be specified. This way all events of the wrapped element get exposed to the client via the events property.

Example usage:

// apply interface to a component class
open class SomeComponent : EventProperties<HTMLDivElement> by EventMixin() {
^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^
implement the | mix in the default implementation
interface |
Enables to access the underlying element,
in this case a ``Div`` element in order
to expose or wrap its events!
}

// use the property offered by the interface
someComponent {
events {
// all events of the ``Div`` element are accessible here
clicks.value handledBy someStore.someHandler
}
}

RFC: If your component does not simply wrap some element and expose its events but instead has to offer its custom and specific events, please offer an `events` property by yourself, so that the access remains unified throughout this framework!

Properties

Link copied to clipboard
abstract val events: ComponentProperty<EventContext<T>.() -> Unit>

This property enables the client to access all events offered by the underlying HTML element.

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard