Interface IEventListener
Namespace: Aspose.Html.Dom.Events
Assembly: Aspose.HTML.dll (25.2.0)
The Aspose.Html.Dom.Events.IEventListener interface is the primary method for handling events. Users implement the Aspose.Html.Dom.Events.IEventListener interface and register their listener on an Aspose.Html.Dom.EventTarget using the Aspose.Html.Dom.EventTarget.AddEventListener(System.String,Aspose.Html.Dom.Events.DOMEventHandler,System.Boolean) method. The users should also remove their Aspose.Html.Dom.Events.IEventListener from its Aspose.Html.Dom.EventTarget after they have completed using the listener.
[ComVisible(true)]
[DOMName("EventListener")]
[DOMObject]
public interface IEventListener
Remarks
When a Node is copied using the cloneNode method the Event Listeners attached to the source Node are not attached to the copied Node. If the user wishes the same Event Listeners to be added to the newly created copy the user must add them manually.
Methods
HandleEvent(Event)
This method is called whenever an event occurs of the type for which the Aspose.Html.Dom.Events.IEventListener interface was registered.
[DOMName("handleEvent")]
void HandleEvent(Event @event)
Parameters
event
Event
The Aspose.Html.Dom.Events.Event contains contextual information about the event. It also contains the Aspose.Html.Dom.Events.Event.StopPropagation and Aspose.Html.Dom.Events.Event.PreventDefault methods which are used in determining the event’s flow and default action.