mySelection.on( eventName, eventHandler, capturePhase ) in D3.js

Retrieve the event listener for an event type.


eventName String Name of the event, e.g. ‘click’ or ‘mouseover’. To register multiple handlers for the same type on the same element, use a trailing namespace, e.g. ‘’ and ‘’.
eventHandler Function Function to be invoked when the event occurs. Will be passed the datum for the current object, the index of that object in the selection, and with the this context set to the DOM element. To remove an event handler, pass null for this parameter.
capturePhase Boolean Corresponds to the W3C useCapture flag.
Return Type


For more details see

See Also