Event listener
Meaning in web development, with examples
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.
In Turkish: olay dinleyicisi, event listener
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
Add one event listener to the form instead of one to every input.
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
Related terms
This word in other fields
The same English word can have a different meaning in another field:
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:
