Constructor
(private) new Binding_(target, type, listener, optionsopt)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
target |
EventTarget | The event target. | |
type |
string | The event type. | |
listener |
shaka.util.EventManager.ListenerType | The event listener. | |
options |
boolean | AddEventListenerOptions |
<optional> |
An object that specifies characteristics about the event listener. The passive option, if true, indicates that this function will never call preventDefault(), which improves scrolling performance. |
- Source:
Members
(private, static) supportsObject_ :boolean|undefined
Type:
- boolean | undefined
- Source:
options :boolean|AddEventListenerOptions
Type:
- boolean | AddEventListenerOptions
- Source:
Methods
(private, static) convertOptions_(target, valueopt) → {boolean|AddEventListenerOptions}
Converts the provided options value into a value accepted by the browser.
Some browsers (e.g. IE11 and Tizen) don't support passing options as an
object. So this detects this case and converts it.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
target |
EventTarget | ||
value |
boolean | AddEventListenerOptions |
<optional> |
- Source:
Returns:
- Type
- boolean | AddEventListenerOptions
(private, static) doesSupportObject_(target) → {boolean}
Checks whether the browser supports passing objects as the third argument
to addEventListener. This caches the result value in a static field to
avoid a bunch of checks.
Parameters:
Name | Type | Description |
---|---|---|
target |
EventTarget |
- Source:
Returns:
- Type
- boolean
(export) unlisten()
Detaches the event listener from the event target. This does nothing if
the event listener is already detached.
- Source: