IEventTarget Interface

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 and dispatch of events to that.

Namespace: Aspose.Html.Dom.Events
Assembly: Aspose.HTML (in Aspose.HTML.dll) Version: 22.1
Syntax
public interface IEventTarget

The IEventTarget type exposes the following members.

Methods
  NameDescription
Public methodAddEventListener(String, IEventListener)

The EventTarget method addEventListener() sets up a function that will be called whenever the specified event is delivered to the target.

Common targets are Element, Document, and Window, but the target may be any object that supports events (such as XMLHttpRequest).

Public methodAddEventListener(String, IEventListener, Boolean)

The EventTarget method addEventListener() sets up a function that will be called whenever the specified event is delivered to the target.

Common targets are Element, Document, and Window, but the target may be any object that supports events (such as XMLHttpRequest).

Public methodDispatchEvent

Dispatches an Event at the specified EventTarget, (synchronously) invoking the 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 dispatchEvent().

Public methodRemoveEventListener(String, IEventListener)

This method allows the removal of event listeners from the event target. If an is removed from an while it is processing an event, it will not be triggered by the current actions. Event Listeners can never be invoked after being removed.

Public methodRemoveEventListener(String, IEventListener, Boolean)

This method allows the removal of event listeners from the event target. If an is removed from an while it is processing an event, it will not be triggered by the current actions. Event Listeners can never be invoked after being removed.

See Also