EventListener
Class which functions as a wrapper which holds a defined listener Function. This is done to ensure that when a listener Function is to be removed from and EventTarget the reference is the same as when it was added.
Constructor Summary
Public Constructor | ||
public |
constructor(type: String, executor: *) |
Method Summary
Public Methods | ||
public |
addTo(target: EventTarget) Binds the defined event-type and executor Function to the target. |
|
public |
removeFrom(target: EventTarget) Removes the defined event-type and executor Function to the target. |
Public Constructors
Public Methods
public addTo(target: EventTarget) source
Binds the defined event-type and executor Function to the target.
Params:
Name | Type | Attribute | Description |
target | EventTarget | EventTarget which should be listened to. |
public removeFrom(target: EventTarget) source
Removes the defined event-type and executor Function to the target.
Params:
Name | Type | Attribute | Description |
target | EventTarget | EventTarget which should be listened to. |