public interface EventTarget
Modifier and Type | Method and Description |
---|---|
void |
addEventListener(java.lang.String type,
EventListener listener)
Register an event handler of a specific event type on the
EventTarget . |
boolean |
dispatchEvent(Event event)
Dispatch an event to this
EventTarget . |
void |
removeEventListener(java.lang.String type,
EventListener listener)
Removes an event listener from the
EventTarget . |
void addEventListener(java.lang.String type, EventListener listener)
EventTarget
.type
- A string representing the event type to listen for.listener
- The object that receives a notification when an event of the specified type occurs.boolean dispatchEvent(Event event)
EventTarget
.event
- The event to dispatchvoid removeEventListener(java.lang.String type, EventListener listener)
EventTarget
.type
- A string representing the event type to remove.listener
- The EventListener function to remove from the event target.