DomListener

class DomListener<E : Event, out X : Element>(events: Flow<E>) : Listener<E>

Handles a Flow of Dom Events.

Constructors

DomListener
Link copied to clipboard
js
fun <E : Event> DomListener(events: Flow<E>)

Functions

composedPath
Link copied to clipboard
js
open fun composedPath(): Flow<Array<EventTarget>>
map
Link copied to clipboard
js
open fun <R> map(transform: suspend (E) -> R): Flow<R>
preventDefault
Link copied to clipboard
js
open override fun preventDefault(): DomListener<E, X>
stopImmediatePropagation
Link copied to clipboard
js
open override fun stopImmediatePropagation(): DomListener<E, X>
stopPropagation
Link copied to clipboard
js
open override fun stopPropagation(): DomListener<E, X>

Properties

events
Link copied to clipboard
js
open override val events: Flow<E>

Extensions

enter
Link copied to clipboard
js
fun DomListener<KeyboardEvent, HTMLInputElement>.enter(): Flow<String>
Gives you the new value as String from the targeting Element when enter is pressed.
fun DomListener<KeyboardEvent, HTMLTextAreaElement>.enter(): Flow<String>
Gives you the new value as String from the targeting Element.
enterAsNumber
Link copied to clipboard
js
fun DomListener<KeyboardEvent, HTMLInputElement>.enterAsNumber(): Flow<Double>
Gives you the new value as Double from the targeting Element when enter is pressed.
files
Link copied to clipboard
js
fun DomListener<Event, HTMLInputElement>.files(): Flow<FileList?>
Gives you the FileList from the targeting Element.
key
Link copied to clipboard
js
fun <X : Element> DomListener<KeyboardEvent, X>.key(): Flow<Key>
Gives you the pressed key as Key from a KeyboardEvent.
selectedIndex
Link copied to clipboard
js
fun DomListener<Event, HTMLSelectElement>.selectedIndex(): Flow<Int>
Gives you the selected index as Int from the targeting Element.
selectedText
Link copied to clipboard
js
fun DomListener<Event, HTMLSelectElement>.selectedText(): Flow<String>
Gives you the selected text as String from the targeting Element.
selectedValue
Link copied to clipboard
js
fun DomListener<Event, HTMLSelectElement>.selectedValue(): Flow<String>
Gives you the selected value as String from the targeting Element.
states
Link copied to clipboard
js
fun DomListener<Event, HTMLInputElement>.states(): Flow<Boolean>
Gives you the checked value as Boolean from the targeting Element.
values
Link copied to clipboard
js
fun DomListener<Event, HTMLInputElement>.values(): Flow<String>
Gives you the new value as String from the targeting Element.
fun DomListener<InputEvent, HTMLInputElement>.values(): Flow<String>
Gives you the new value as String from the targeting Element.
fun DomListener<Event, HTMLSelectElement>.values(): Flow<String>
Gives you the new value as String from the targeting Element.
fun DomListener<Event, HTMLTextAreaElement>.values(): Flow<String>
Gives you the new value as String from the targeting Element.
valuesAsNumber
Link copied to clipboard
js
fun DomListener<Event, HTMLInputElement>.valuesAsNumber(): Flow<Double>
Gives you the new value as Double from the targeting Element.
fun DomListener<InputEvent, HTMLInputElement>.valuesAsNumber(): Flow<Double>
Gives you the new value as Double from the targeting Element.