What does event listener mean?

In web development, event listener means a function that waits for a specific event on an element, such as a click or a key press, and runs when that event happens.

nounCommon term

Web Development vocabulary · JavaScript, Frameworks and Tooling

In Turkish: olay dinleyicisi, event listener

Also used in: Software Engineering

How it is used

Added with addEventListener() and removed with removeEventListener(). Forgotten listeners can cause memory leaks or code that runs twice. 'Event handler' is used for almost the same idea.

Example sentences

  1. Add one event listener to the form instead of one to every input.

  2. The modal closes twice because two event listeners are attached.

Common collocations

  • add an event listener
  • remove an event listener
  • attach a listener
  • scroll listener

More terms: JavaScript, Frameworks and Tooling

Practise with graded reading

Reading at the right level is the fastest way to make new words stick. Pick free English books by level: