Constructor
new ListenersStorage()
- Source:
Creates new storage for event lsiteners
Methods
add(element, type, selector, fn, listener) → {void}
- Source:
Adds event listener to the storage.
Parameters:
Name | Type | Description |
---|---|---|
element |
Object | Element to which listener is binded. |
type |
String | Type of event. |
selector |
String | Selector for event delegation. |
fn |
function | Original callback. |
listener |
function | Created listener. |
Returns:
- Type
- void
get(element, type, selector, fn) → {function}
- Source:
Gets event listener that matches the given criteria.
Parameters:
Name | Type | Description |
---|---|---|
element |
Object | Element to which listener is binded. |
type |
String | Type of event. |
selector |
String | Selector for event delegation. |
fn |
function | Original callback. |
Returns:
Event listener.
- Type
- function
remove(element, type, selector, fn) → {function}
- Source:
Removes event listener that matches the given criteria.
Parameters:
Name | Type | Description |
---|---|---|
element |
Object | Element to which listener is binded. |
type |
String | Type of event. |
selector |
String | Selector for event delegation. |
fn |
function | Original callback. |
Returns:
Event listener.
- Type
- function