Event

sealed interface Event

Node API: Event

The Event object is an adaptation of the Event Web API. Instances are created internally by Elide.

The root Event interface describes properties which are made available on all event types, regardless of how they are created or used; application-level events should extend CustomEvent to gain Event implementation access.

 

Event Properties

Events, by nature, are always expected to at least define a string type as their "event name," or "event type." Listeners typically subscribe to events based on the type value.

The event type can be a String or a JsSymbol.

 

Custom Events

Applications that wish to dispatch or emit their own events can do so by either (1) extending CustomEvent and overriding properties as needed; or (2) creating an instance of CustomEvent via the provided public constructor.

Custom events can be initialized via their constructor, or via the CustomEvent.initEvent method.

Inheritors

Properties

Link copied to clipboard
abstract val bubbles: Boolean

TBD.

Link copied to clipboard
abstract val cancelable: Boolean

TBD.

Link copied to clipboard
abstract val composed: Boolean

TBD.

Link copied to clipboard
abstract val currentTarget: EventTarget?

TBD.

Link copied to clipboard

TBD.

Link copied to clipboard
abstract val eventPhase: Int

TBD.

Link copied to clipboard
abstract val isTrusted: Boolean

TBD.

Link copied to clipboard
abstract val returnValue: Boolean

TBD.

Link copied to clipboard
abstract val srcElement: EventTarget?

TBD.

Link copied to clipboard
abstract val target: EventTarget?

TBD.

Link copied to clipboard
abstract val timeStamp: Double

TBD.

Link copied to clipboard
abstract val type: String

TBD.

Functions

Link copied to clipboard
abstract fun composedPath(): Array<EventTarget>

TBD.

Link copied to clipboard
abstract fun initEvent(type: String, bubbles: Boolean, cancelable: Boolean)

TBD.

Link copied to clipboard
abstract fun preventDefault()

TBD.

Link copied to clipboard

TBD.

Link copied to clipboard
abstract fun stopPropagation()

TBD.