Class: shaka.util.EventManager

Constructor

new EventManager()

Creates a new EventManager. An EventManager maintains a collection of "event bindings" between event targets and event listeners.
Implements:
Source:

Classes

shaka.util.EventManager.Binding_

Members

(private) bindingMap_ :shaka.util.MultiMap.<!shaka.util.EventManager.Binding_>

Maps an event type to an array of event bindings.
Type:
Source:

Methods

destroy() → (non-null) {Promise}

Detaches all event listeners.
Implements:
Source:
Returns:
Type
Promise

listen(target, type, listener)

Attaches an event listener to an event target.
Parameters:
Name Type Description
target EventTarget The event target.
type string The event type.
listener shaka.util.EventManager.ListenerType The event listener.
Source:

removeAll()

Detaches all event listeners from all targets.
Source:

unlisten(target, type)

Detaches an event listener from an event target.
Parameters:
Name Type Description
target EventTarget The event target.
type string The event type.
Source:

Type Definitions

ListenerType

Type:
  • function(!Event)
Source: