Package-level declarations

Types

Link copied to clipboard
open class CustomEvent<out D : JsAny?>(val type: EventType<CustomEvent<D>>, init: CustomEventInit<D> = definedExternally) : Event

The CustomEvent interface represents events initialized by an application for any purpose.

Link copied to clipboard
interface CustomEventInit<out D : JsAny?> : EventInit
Link copied to clipboard
open class Event(val type: EventType<Event>, init: EventInit = definedExternally)

The Event interface represents an event which takes place on an EventTarget.

Link copied to clipboard
sealed interface EventHandler<in E : Event, out C : EventTarget, out T : EventTarget>
Link copied to clipboard
interface EventInit
Link copied to clipboard
class EventInstance<out E : Event, out C : EventTarget, out T : EventTarget>(target: C, type: EventType<E>)
Link copied to clipboard
Link copied to clipboard
sealed interface EventPhase
Link copied to clipboard
open class EventTarget
Link copied to clipboard
sealed interface EventType<out E : Event>
Link copied to clipboard
interface HasTargets<out C : EventTarget, out T : EventTarget>
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class JsEvent(val type: String)
Link copied to clipboard
open class ProgressEvent(val type: EventType<ProgressEvent>, init: ProgressEventInit = definedExternally) : Event

The ProgressEvent interface represents events that measure the progress of an underlying process, like an HTTP request (e.g., an XMLHttpRequest, or the loading of the underlying resource of an img, audio, video, style or link).

Link copied to clipboard

Functions

Link copied to clipboard
fun <E : Event, C : EventTarget, D : E, HasTargets<C, EventTarget>> C.addEventHandler(type: EventType<E>, handler: (D) -> Unit): () -> Unit
fun <E : Event, C : EventTarget, T : EventTarget> C.addEventHandler(type: EventType<E>, handler: EventHandler<E, C, T>): () -> Unit
fun <E : Event, C : EventTarget, D : E, HasTargets<C, EventTarget>> C.addEventHandler(    type: EventType<E>,     options: AddEventListenerOptions?,     handler: (D) -> Unit): () -> Unit
fun <E : Event, C : EventTarget, T : EventTarget> C.addEventHandler(    type: EventType<E>,     options: AddEventListenerOptions?,     handler: EventHandler<E, C, T>): () -> Unit
Link copied to clipboard
fun <E : Event, C : EventTarget> C.addEventListener(type: EventType<E>, handler: (E) -> Unit, options: AddEventListenerOptions? = undefined)
fun <E : Event, C : EventTarget, T : EventTarget> C.addEventListener(    type: EventType<E>,     handler: EventHandler<E, C, T>,     options: AddEventListenerOptions? = undefined)
Link copied to clipboard
fun <E : Event, C : EventTarget, T : EventTarget, D : E, HasTargets<C, T>> EventInstance<E, C, T>.addHandler(handler: (D) -> Unit): () -> Unit
fun <E : Event, C : EventTarget, T : EventTarget, D : E, HasTargets<C, T>> EventInstance<E, C, T>.addHandler(    options: AddEventListenerOptions?,     handler: (D) -> Unit): () -> Unit
fun <E : Event, C : EventTarget, T : EventTarget> EventInstance<E, C, T>.addHandler(    handler: EventHandler<E, C, T>,     options: AddEventListenerOptions? = undefined): () -> Unit
Link copied to clipboard
fun <E : Event, T : EventTarget, D : E, HasTargets<*, T>> EventInstance<E, *, T>.asFlow(): Flow<D>
Link copied to clipboard
inline fun EventHandler(noinline handler: () -> Unit): EventHandler<Event, Nothing, Nothing>
inline fun <E : Event, C : EventTarget, T : EventTarget, D : E, HasTargets<C, T>> EventHandler(noinline handler: (D) -> Unit): EventHandler<E, C, T>
Link copied to clipboard
inline fun <E : Event> EventType(value: String): EventType<E>
Link copied to clipboard
suspend operator fun <E : Event, T : EventTarget, D : E, HasTargets<*, T>> EventInstance<E, *, T>.iterator(): SuspendableIterator<D>
Link copied to clipboard
suspend fun <E : Event, C : EventTarget, T : EventTarget, D : E, HasTargets<C, T>> EventInstance<E, C, T>.once(): D
Link copied to clipboard
fun <E : Event, C : EventTarget> C.removeEventListener(type: EventType<E>, handler: (E) -> Unit, options: AddEventListenerOptions? = undefined)
fun <E : Event, C : EventTarget, T : EventTarget> C.removeEventListener(    type: EventType<E>,     handler: EventHandler<E, C, T>,     options: AddEventListenerOptions? = undefined)
Link copied to clipboard
suspend fun <E : Event, C : EventTarget, T : EventTarget, D : E, HasTargets<C, T>> EventInstance<E, C, T>.subscribe(handler: (D) -> Unit): Job
suspend fun <E : Event, C : EventTarget, T : EventTarget, D : E, HasTargets<C, T>> EventInstance<E, C, T>.subscribe(    options: AddEventListenerOptions?,     handler: (D) -> Unit): Job
suspend fun <E : Event, C : EventTarget, T : EventTarget> EventInstance<E, C, T>.subscribe(    handler: EventHandler<E, C, T>,     options: AddEventListenerOptions? = undefined): Job