EventTargetAddEventListener Method (String, IEventListener, Boolean)
public void AddEventListener( string type, IEventListener listener, bool useCapture )
Public Sub AddEventListener ( type As String, listener As IEventListener, useCapture As Boolean )
public: virtual void AddEventListener( String^ type, IEventListener^ listener, bool useCapture ) sealed
abstract AddEventListener : type : string * listener : IEventListener * useCapture : bool -> unit override AddEventListener : type : string * listener : IEventListener * useCapture : bool -> unit
If an IEventListener is added to an EventTarget while it is processing an event, it will not be triggered by the current actions but may be triggered during a later stage of event flow, such as the bubbling phase.
If multiple identical Event Listeners are registered on the same EventTarget with the same parameters the duplicate instances are discarded. They do not cause the IEventListener to be called twice and since they are discarded they do not need to be removed with the RemoveEventListener(String, DOMEventHandler, Boolean) method.