Listener

class Listener<X : Event, out T : EventTarget>(events: Flow<X>) : Flow<X>

Encapsulates the Flow of the Event.

Constructors

Link copied to clipboard
fun <X : Event> Listener(events: Flow<X>)

Functions

Link copied to clipboard
open suspend override fun collect(collector: FlowCollector<X>)
Link copied to clipboard
fun composedPath(): Flow<Array<EventTarget>>

Calls Event.composedPath on the Event-flow.

Link copied to clipboard
fun preventDefault(): Listener<X, T>

Calls Event.preventDefault on the Event-flow.

Link copied to clipboard
fun stopImmediatePropagation(): Listener<X, T>
Link copied to clipboard
fun stopPropagation(): Listener<X, T>

Calls Event.stopPropagation on the Event-flow.

Extensions

Link copied to clipboard
fun Listener<*, HTMLInputElement>.files(): Flow<FileList?>

Extracts a FileList from the Event.target.

Link copied to clipboard
fun Listener<*, HTMLSelectElement>.selectedIndex(): Flow<Int>
Link copied to clipboard
fun Listener<*, HTMLSelectElement>.selectedText(): Flow<String>

Extracts the HTMLOptionElement.text from the selected HTMLOptionElement.

Link copied to clipboard
fun Listener<*, HTMLSelectElement>.selectedValue(): Flow<String>

Extracts the HTMLOptionElement.value from the selected HTMLOptionElement.

Link copied to clipboard
fun Listener<*, HTMLInputElement>.states(): Flow<Boolean>

Extracts the HTMLInputElement.checked state from the Event.target.

Link copied to clipboard
fun Listener<*, HTMLInputElement>.values(): Flow<String>
fun Listener<*, HTMLSelectElement>.values(): Flow<String>
fun Listener<*, HTMLFieldSetElement>.values(): Flow<String>
fun Listener<*, HTMLTextAreaElement>.values(): Flow<String>

Extracts the HTMLInputElement.value from the Event.target.