EventTarget class
EventTarget class
The EventTarget
interface is implemented by all Nodes in an implementation which supports the DOM Event Model.
Therefore, this interface can be obtained by using binding-specific casting methods on an instance of the Node interface.
The interface allows registration and removal of Event Listeners on an EventTarget
and dispatch of events to that IEventTarget
.
Inheritance: EventTarget
→
DOMObject
The EventTarget type exposes the following members:
Constructors
Constructor | Description |
---|---|
init | Constructs a new instance of EventTarget |
Methods
Method | Description |
---|---|
add_event_listener | Sets up a function that will be called whenever the specified event is delivered to the target. It works by adding a function, or an object that implements IEventListener ,to the list of event listeners for the specified event type on the EventTarget on which it’s called.If the function or object, is already in the list of event listeners for this target, they are not added a second time. |
add_event_listener | Sets up a function that will be called whenever the specified event is delivered to the target. It works by adding a function, or an object that implements IEventListener ,to the list of event listeners for the specified event type on the EventTarget on which it’s called.If the function or object, is already in the list of event listeners for this target, they are not added a second time. |
remove_event_listener | This method allows the removal of event listeners from the event target. If an IEventListener is removed from an EventTarget while it is processing an event, it will not be triggered by the current actions.Event Listeners can never be invoked after being removed. |
remove_event_listener | This method allows the removal of event listeners from the event target. If an IEventListener is removed from an EventTarget while it is processing an event, it will not be triggered by the current actions.Event Listeners can never be invoked after being removed. |
get_platform_type | This method is used to retrieve the ECMAScript object Type. |
dispatch_event | Dispatches an Event at the specified IEventTarget , (synchronously) invokingthe affected EventListeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with IEventTarget.dispatch_event . |
See Also
- module
aspose.html.dom
- class
DOMObject
- class
EventTarget
- class
IEventListener
- class
IEventTarget