IDocumentEventCreateEvent Method
Creates an Event of a type supported by the implementation.

Namespace: Aspose.Html.Dom.Events
Assembly: Aspose.HTML (in Aspose.HTML.dll) Version: 20.3
Syntax
Event CreateEvent(
	string eventType
)

Parameters

eventType
Type: SystemString
The eventType parameter specifies the type of Event interface to be created.
Remarks
If the Event interface specified is supported by the implementation this method will return a new Event of the interface type requested. If the Event is to be dispatched via the DispatchEvent(Event) method the appropriate InitEvent(String, Boolean, Boolean) method must be called after creation in order to initialize the Event's values.

The CreateEvent(String) method is used in creating Events when it is either inconvenient or unnecessary for the user to create an Event themselves. In cases where the implementation provided Event is insufficient, users may supply their own Event implementations for use with the DispatchEvent(Event) method.

Return Value

Type: Event
The newly created Event
Exceptions
ExceptionCondition
DOMException NOT_SUPPORTED_ERR: Raised if the implementation does not support the type of Event interface requested
See Also