Constructor
new EventManager()
Creates a new EventManager. An EventManager maintains a collection of "event
bindings" between event targets and event listeners.
- Implements:
- Source:
Classes
Members
(private) bindingMap_ :shaka.util.MultiMap.<!shaka.util.EventManager.Binding_>
Maps an event type to an array of event bindings.
Type:
- Source:
Methods
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:
listenOnce(target, type, listener)
Attaches an event listener to an event target. The listener will be removed
when the first instance of the event is fired.
Parameters:
Name | Type | Description |
---|---|---|
target |
EventTarget | The event target. |
type |
string | The event type. |
listener |
shaka.util.EventManager.ListenerType | The event listener. |
- Source:
(export) release()
Detaches all event listeners.
- Implements:
- 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: