create_event method
create_event
Creates an Event
of a type supported by the implementation.
Returns
The newly created Event
def create_event(self, event_type):
...
Parameter | Type | Description |
---|---|---|
event_type | str | The eventType parameter specifies the type of Event interface to be created.If the Event interface specified is supported by the implementation this method willreturn a new Event of the interface type requested.If the Event is to be dispatched via the IEventTarget.dispatch_event method the appropriate Event.init_event method must be called after creation in order to initialize the Event ’s values.The IDocumentEvent.create_event method is used in creating Event s when it is either inconvenient or unnecessaryfor the user to create an Event themselves.In cases where the implementation provided Event is insufficient, users may supplytheir own Event implementations for use with the IEventTarget.dispatch_event method. |
Exceptions
Exception | Description |
---|---|
DOMException | NOT_SUPPORTED_ERR: Raised if the implementation does not support the type of Event interface requested |
See Also
- module
aspose.html
- class
DOMException
- class
Event
- class
HTMLDocument