isBound
isBound(
element,type,handler):boolean
Defined in: core/dom/events.ts:81
Returns true if a listener added with evt is still bound.
Pass the listener function itself: that works everywhere. Passing its name as
a string is only kept for old callers, and relies on Function.name, which
IE10 does not have, so there it never matches.
Parameters
Section titled “Parameters”element
Section titled “element”EventTarget
The element the listener was added to.
string
Event type, e.g. keydown.
handler
Section titled “handler”string | EventListener
The listener function, or its name.
Returns
Section titled “Returns”boolean
Example
Section titled “Example”if (!isBound(document, 'keydown', onKeydown)) { evt(document, 'keydown', onKeydown);}