Do terms "event handler" and "event listener" have any difference? #612
-
There are many pages which both terms are present, sometimes even within a single paragraph. IMO it would be better to stick with one to reduce any chance of confusion, but before that, do they differ in their actual meaning, even if little? "Listening" and "handling" are indeed not equal, but |
Beta Was this translation helpful? Give feedback.
Replies: 0 comments 1 reply
-
From MDN IMO they should be preserved, unless they are used incorrectly. Most of the time in "Learn" we'll be talking about the handler since that is the code that actually gets run. |
Beta Was this translation helpful? Give feedback.
From MDN
Event handlers are sometimes called event listeners — they are pretty much interchangeable for our purposes, although strictly speaking, they work together. The listener listens out for the event happening, and the handler is the code that is run in response to it happening
IMO they should be preserved, unless they are used incorrectly. Most of the time in "Learn" we'll be talking about the handler since that is the code that actually gets run.