-1

When would you ever use the Event Flow is an application? What I'm referring to is the third parameter of the AddEventListener function. Can anyone provide a real world example?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Brandon Michael Hunter
  • 1,179
  • 3
  • 20
  • 48

1 Answers1

1

There aren't a lot of reasons to use event capturing instead of event bubbling. Furthermore, event capturing isn't supported in IE8.

For more info, this page deals with the differences between bubbling/capturing.

In practice, the only reason that I can think of to use event capturing is to deal with events that don't bubble, namely onfocus and onblur. See also this SO post dealing with onblur

Community
  • 1
  • 1
Mike
  • 1,266
  • 1
  • 11
  • 17