Event-driven programming is a computer programming paradigm where control flow of the program is determined by the occurrence of events. These events are monitored by code known as an event listener. If it detects that an assigned event has occurred, it runs an event handler (a callback function or method that’s triggered when the event occurs).
In theory, all programming languages support the event-driven style of programming, although some language features, such as closures, make it easier to implement. Other programming environments, such as Adobe Flash, are specifically tailored for triggering program code by events.
Paradigm, Programming terms