| Modifier and Type | Class and Description |
|---|---|
static interface |
BaseEventTarget.EventListenerCallback
The object which receives a notification when an event of the specified type occurs.
Represents an object that can handle an event dispatched by a element. |
| Modifier and Type | Method and Description |
|---|---|
void |
addEventListener(String type,
CallbackProxy.Proxy listener)
Sets up a function that will be called whenever the specified event is delivered to the target.
|
void |
removeEventListener(String type,
CallbackProxy.Proxy listener)
Removes from the event target an event listener previously registered.
The event listener to be removed is identified using a combination of the event type and the event listener function itself. |
@JsMethod public final void addEventListener(String type, CallbackProxy.Proxy listener)
type - a case-sensitive string representing the event type to listen forlistener - the object which receives a notification when an event of the specified type occursBaseEventTypes@JsMethod public final void removeEventListener(String type, CallbackProxy.Proxy listener)
type - a string which specifies the type of event for which to remove an event listenerlistener - function instance of the event handler to remove from the event target.