dispatch_event method

dispatch_event

Dispatches an Event at the specified IEventTarget, (synchronously) invoking the affected EventListeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with IEventTarget.dispatch_event.

Returns

The return value of EventTarget.dispatch_event indicates whether any of the listeners which handled the event called Event.prevent_default. If Event.prevent_default was called the value is false, else the value is true.

def dispatch_event(self, event):
    ...
ParameterTypeDescription
eventaspose.html.dom.events.EventSpecifies the event type, behavior, and contextual information to be used in processing the event.

Remarks

Events dispatched in this manner will have the same capturing and bubbling behavior as events dispatched directly by the implementation. The target of the event is the EventTarget on which EventTarget.dispatch_event is called.### Exceptions

ExceptionDescription
DOMException

See Also