public class EventListenersContainer extends Object implements Serializable
| Constructor and Description |
|---|
EventListenersContainer(EventTarget jsNode)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addEventListener(String type,
org.htmlunit.corejs.javascript.Scriptable listener,
boolean useCapture)
Adds an event listener.
|
void |
executeAtTargetListeners(Event event,
Object[] args)
Executes listeners for events targeting the node.
|
void |
executeBubblingListeners(Event event,
Object[] args)
Executes bubbling listeners.
|
void |
executeCapturingListeners(Event event,
Object[] args)
Executes capturing listeners.
|
org.htmlunit.corejs.javascript.Function |
getEventHandler(String eventType)
Returns an event handler.
|
List<org.htmlunit.corejs.javascript.Scriptable> |
getListeners(String eventType,
boolean useCapture)
Returns the relevant listeners.
|
void |
setEventHandler(String eventType,
Object value)
Sets the handler property (with a handler or something else).
|
String |
toString() |
public EventListenersContainer(EventTarget jsNode)
jsNode - the node.public boolean addEventListener(String type, org.htmlunit.corejs.javascript.Scriptable listener, boolean useCapture)
type - the event type to listen for (like "load")listener - the event listeneruseCapture - If true, indicates that the user wishes to initiate capture (not yet implemented)true if the listener has been addedpublic List<org.htmlunit.corejs.javascript.Scriptable> getListeners(String eventType, boolean useCapture)
eventType - the event typeuseCapture - whether to use capture of notpublic void setEventHandler(String eventType, Object value)
eventType - the event type (like "click")value - the new propertypublic void executeBubblingListeners(Event event, Object[] args)
event - the eventargs - argumentspublic void executeCapturingListeners(Event event, Object[] args)
event - the eventargs - the argumentspublic void executeAtTargetListeners(Event event, Object[] args)
event - the eventargs - the argumentspublic org.htmlunit.corejs.javascript.Function getEventHandler(String eventType)
eventType - the event name (e.g. "click")null if the property is null or not a functionCopyright © 2002–2025 Gargoyle Software Inc.. All rights reserved.