add event listener javascript mdn code example Example: eventlistener javascript element .addEventListener( event, function, useCapture );