init_event method

init_event

The Event.init_event method is used to initialize the value of an Event created through the IDocumentEvent interface.

def init_event(self, type, bubbles, cancelable):
    ...
ParameterTypeDescription
typestrThe event type.
bubblesboolif set to true [bubbles].
cancelableboolif set to true [cancelable].

Remarks

This method may only be called before the Event has been dispatched via the IEventTarget.dispatch_event method, though it may be called multiple times during that phase if necessary. If called multiple times the final invocation takes precedence. If called from a subclass of Event interface only the values specified in the initEvent method are modified, all other attributes are left unchanged.

See Also