EventDispatcher

Dispatches events to listeners registered by event name and capture flag.

Parameters

target

The dispatcher exposed as the current event target, or null to use this instance.

Inheritors

Constructors

Link copied to clipboard
constructor(target: IEventDispatcher?)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun addEventListener(type: String, listener: IEventListener, useCapture: Boolean)

Registers a listener for an event name and capture flag.

open fun addEventListener(type: String, listener: IEventListener)

Registers a listener with capture disabled.

Link copied to clipboard
open override fun dispatchEvent(event: Event)

Delivers an event to the matching listeners.

Link copied to clipboard
open override fun dispatchEventWith(type: String, bubbles: Boolean, data: Any?)

Creates and dispatches an event with the given name, bubbling flag, and payload.

open fun dispatchEventWith(type: String)

Creates and dispatches a non-bubbling event without a payload.

open fun dispatchEventWith(type: String, bubbles: Boolean)

Creates and dispatches an event without a payload.

Link copied to clipboard
open override fun removeEventListener(type: String, listener: IEventListener, useCapture: Boolean)

Unregisters a listener using the event name and capture flag supplied during registration.

open fun removeEventListener(type: String, listener: IEventListener)

Unregisters a listener registered with capture disabled.