Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EventListenerData<TEvent>

Data object that is created on every call to EventDispatcher.addEventListener. The object is saved on the EventDispatcher.listeners object for internal use but is also returned by the addEventListener method as a way to remove the listener.

Type parameters

Hierarchy

  • Disposable
    • EventListenerData

Implements

  • IDisposable

Index

Constructors

constructor

Properties

dispatcher

dispatcher: EventDispatcher<TEvent>

handler

handler: EventHandlerForEvent<TEvent>

isRemoved

isRemoved: boolean = false

This property will be set to true by the EventDispatcher this listener is bound to when the listener is removed. This is to make sure the handler is not called, even if the listener is removed while dispatching the event.

priority

priority: number

type

type: TypesForEvent<TEvent>

useCapture

useCapture: boolean

Methods

dispose

  • dispose(): void
  • Detaches this event listener from its EventDispatcher. The handler function on this listener will no longer be called in response to dispatched events.

    Returns void

isDisposed

  • isDisposed(): boolean
  • After dispose has been called, this method returns true. Use this method to determine whether dispose() should be run again.

    Returns boolean

Generated using TypeDoc