Event Class
The Event is used to provide contextual information about an event to the handler processing the event.
Inheritance Hierarchy

Namespace: Aspose.Html.Dom.Events
Assembly: Aspose.HTML (in Aspose.HTML.dll) Version: 21.1
Syntax
public class Event : DOMObject

The Event type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyBubbles
Used to indicate whether or not an event is a bubbling event. If the event can bubble the value is true, else the value is false.
Public propertyCancelable
Used to indicate whether or not an event can have its default action prevented. If the default action can be prevented the value is true, else the value is false.
Public propertyCurrentTarget
Used to indicate the IEventTarget whose IEventListeners are currently being processed. This is particularly useful during capturing and bubbling.
Public propertyDefaultPrevented
Returns true if preventDefault() was invoked while the cancelable attribute value is true, and false otherwise.
Public propertyEventPhase
Used to indicate which phase of event flow is currently being evaluated.
Public propertyIsTrusted
The isTrusted attribute must return the value it was initialized to. When an event is created the attribute must be initialized to false.
Public propertyTarget
Used to indicate the IEventTarget to which the event was originally dispatched.
Public propertyTimeStamp
Used to specify the time (in milliseconds relative to the epoch) at which the event was created. Due to the fact that some systems may not provide this information the value of timeStamp may be not available for all events. When not available, a value of 0 will be returned. Examples of epoch time are the time of the system start or 0:0:0 UTC 1st January 1970.
Public propertyType
The name of the event (case-insensitive). The name must be an XML name.
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodInitEvent
The InitEvent(String, Boolean, Boolean) method is used to initialize the value of an Event created through the IDocumentEvent interface.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodPreventDefault
If an event is cancelable, the PreventDefault method is used to signify that the event is to be canceled, meaning any default action normally taken by the implementation as a result of the event will not occur.
Public methodStopImmediatePropagation
Invoking this method prevents event from reaching any event listeners registered after the current one and when dispatched in a tree also prevents event from reaching any other objects.
Public methodStopPropagation
The StopPropagation method is used prevent further propagation of an event during event flow.
Public methodToString (Inherited from Object.)
Fields
  NameDescription
Public fieldStatic memberAtTargetPhase
The current event phase is the capturing phase.
Public fieldStatic memberBubblingPhase
The current event phase is the bubbling phase.
Public fieldStatic memberCapturingPhase
The event is currently being evaluated at the target IEventTarget.
Public fieldStatic memberNonePhase
Events not currently dispatched are in this phase.
Remarks
An object which implements the Event is generally passed as the first parameter to an event handler. More specific context information is passed to event handlers by deriving additional interfaces from Event which contain information directly relating to the type of event they accompany. These derived interfaces are also implemented by the object passed to the event listener.
See Also