Package org.pepstock.charba.client.dom
Class BaseEventTarget
- java.lang.Object
-
- org.pepstock.charba.client.dom.BaseEventTarget
-
-
Nested Class Summary
Nested Classes Modifier and Type Class 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Method Detail
-
addEventListener
@JsMethod public final void addEventListener(String type, CallbackProxy.Proxy listener)
Sets up a function that will be called whenever the specified event is delivered to the target.- Parameters:
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 occurs- See Also:
BaseEventTypes
-
removeEventListener
@JsMethod public final 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.- Parameters:
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.
-
-