remove_event_listener method

remove_event_listener

This method allows the removal of event listeners from the event target. If an IEventListener is removed from an EventTarget while it is processing an event, it will not be triggered by the current actions. Event Listeners can never be invoked after being removed.

def remove_event_listener(self, type, listener):
    ...
ParameterTypeDescription
typestrSpecifies the event type of the IEventListener being removed.
listeneraspose.html.dom.events.IEventListenerThe IEventListener parameter indicates the IEventListener to be removed.

remove_event_listener

This method allows the removal of event listeners from the event target. If an IEventListener is removed from an EventTarget while it is processing an event, it will not be triggered by the current actions. Event Listeners can never be invoked after being removed.

def remove_event_listener(self, type, listener, use_capture):
    ...
ParameterTypeDescription
typestrSpecifies the event type of the IEventListener being removed.
listeneraspose.html.dom.events.IEventListenerThe IEventListener parameter indicates the IEventListener to be removed.
use_captureboolSpecifies whether the EventListener being removed was registered as a capturing listener or not.
If a listener was registered twice, one with capture and one without, each must be removed separately.
Removal of a capturing listener does not affect a non-capturing version of the same listener, and vice versa.

See Also