Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Event<T>

Provides the ability raise and subscribe to an event.

Type parameters

  • T

Hierarchy

  • Event

Index

Properties

Private _event

_event: Event = new CesiumEvent()

addEventListener

addEventListener: function = this._event.addEventListener.bind(this._event)

Add an event listener.

param

function to be executed when the event is raised.

returns

A convenience function which removes this event listener when called

Type declaration

raiseEvent

raiseEvent: function = this._event.raiseEvent.bind(this._event)

Raises the event by calling each registered listener with all supplied arguments.

param

method takes any number of parameters and passes them through to the listener functions.

Type declaration

    • (data: T): void
    • Parameters

      • data: T

      Returns void

removeEventListener

removeEventListener: function = this._event.removeEventListener.bind(this._event)

Remove an event listener.

param

function to be unregistered.

returns

True if the listener was removed; false if the listener and scope are not registered with the event.

Type declaration

    • (listener: function): boolean
    • Parameters

      • listener: function
          • (data: T): void
          • Parameters

            • data: T

            Returns void

      Returns boolean

Accessors

numberOfListeners

  • get numberOfListeners(): number
  • Get the number of listeners currently subscribed to the event.

    Returns number

    Number of listeners currently subscribed to the event.

Generated using TypeDoc