Class: shaka.util.EventManager.Binding_

Constructor

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

supportsObject_ :boolean|undefined

Type:
  • boolean | undefined
Source:

options :boolean|AddEventListenerOptions

Type:
  • boolean | AddEventListenerOptions
Source:

target :EventTarget

Type:
  • EventTarget
Source:

type :string

Type:
  • string
Source:

Methods

convertOptions_(target, valueopt) → {boolean|AddEventListenerOptions}

Converts the provided options value into a value accepted by the browser. Some browsers (e.g. 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

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

unlisten()

Detaches the event listener from the event target. This does nothing if the event listener is already detached.
Source: