Event driven programming has been the norm for GUI systems as long as they have existed. I think that the heritage came from Simula in the 1960s, which influenced SmallTalk in the 1970s, which was a major influence for most object-oriented languages and GUI systems since then.
Erlang and JavaScript come much much later on in the evolution of programming languages; Erlang originated in the late 1980s, and JavaScript in 1995.