Interface IDocumentEvent

Interface IDocumentEvent

Namespace: Aspose.Html.Dom.Events
Assembly: Aspose.HTML.dll (25.2.0)

The Aspose.Html.Dom.Events.IDocumentEvent interface provides a mechanism by which the user can create an Aspose.Html.Dom.Events.Event of a type supported by the implementation.

[ComVisible(true)]
[DOMNoInterfaceObject]
public interface IDocumentEvent

Remarks

It is expected that the Aspose.Html.Dom.Events.IDocumentEvent interface will be implemented on the same object which implements the Aspose.Html.Dom.Document interface in an implementation which supports the Event model.

Methods

CreateEvent(string)

Creates an Aspose.Html.Dom.Events.Event of a type supported by the implementation.

[DOMName("createEvent")]
Event CreateEvent(string eventType)

Parameters

eventType string

The eventType parameter specifies the type of Aspose.Html.Dom.Events.Event interface to be created. If the Aspose.Html.Dom.Events.Event interface specified is supported by the implementation this method will return a new Aspose.Html.Dom.Events.Event of the interface type requested. If the Aspose.Html.Dom.Events.Event is to be dispatched via the Aspose.Html.Dom.EventTarget.DispatchEvent(Aspose.Html.Dom.Events.Event) method the appropriate Aspose.Html.Dom.Events.Event.InitEvent(System.String,System.Boolean,System.Boolean) method must be called after creation in order to initialize the Aspose.Html.Dom.Events.Event’s values.

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

Returns

Event

The newly created Aspose.Html.Dom.Events.Event

Exceptions

DOMException

NOT_SUPPORTED_ERR: Raised if the implementation does not support the type of Aspose.Html.Dom.Events.Event interface requested