init_custom_event method

init_custom_event

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

def init_custom_event(self, type, bubbles, cancelable, detail):
    ...
ParameterTypeDescription
typestrThe event type.
bubblesboolif set to true [bubbles].
cancelableboolif set to true [cancelable].
detailanyThe custom data.

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