public interface EventTarget extends Disposable
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addEventListener(EventType type,
EventHandler<?> handler,
boolean opt_capture)
Adds an event listener to the event target.
|
void |
removeEventListener(EventType type,
EventHandler<?> handler,
boolean opt_capture)
Removes an event listener from the event target.
|
void addEventListener(EventType type, EventHandler<?> handler, boolean opt_capture)
type - The type of the event to listen for.handler - The function to handle the event. The handler can also be an object that
implements the handleEvent method which takes the event object as argument.opt_capture - In DOM-compliant browsers, this determines whether the listener is fired
during the capture or bubble phase of the event.void removeEventListener(EventType type, EventHandler<?> handler, boolean opt_capture)
type - The type of the event to listen for.handler - The function to handle the event. The handler can also be an object that
implements the handleEvent method which takes the event object as argument.opt_capture - In DOM-compliant browsers, this determines whether the listener is fired
during the capture or bubble phase of the event.Copyright © 2013. All Rights Reserved.