November 2022
Beginner
624 pages
13h 39m
English
In this Chapter
Learn how events travel through the DOM
Understand the differences between event capturing and event bubbling
Interrupt events
In the previous chapter, you learned how to use the addEventListener function to listen for events that you want to react to. That chapter covered the basics, but it glossed over an important detail about how events actually get fired. An event isn’t an isolated disturbance. Like a butterfly flapping its wings, an earthquake, a meteor strike, or a Godzilla visit, many events ripple and affect a bunch of elements that lie in their path.
In this chapter, I will put on my investigative glasses, a top hat, and a serious British accent to explain what exactly happens when ...
Read now
Unlock full access