Why does jQuery event model does not support event Capture and just supports event bubbling?
Because not all browsers support event capturing, especially IE. As jQuery is supposed to be cross-browser compatible, it cannot offer event capturing (it might be possible to simulate event capturing, but if it were easy, I'm sure they would have done it).
This was infact a desirable feature in jQuery 2 but the core-team was pretty much convinced that allowing capturing events to have equal standing throughout the entire jQuery event system would open up a whole lot of issues. The original ticket can be found here[1]. They even closed the ticket after few discussions.
Moreover, browsers older then IE8 and Opera 7.0 does not support event capturing. Since the primary goal of jQuery is to provide cross-browser support, it does not support event capturing.
On a lighter note, it seems jQuery is more focused to leverage Event Delegation which is based on bubbling of events up to the DOM tree.
© 2022 - 2024 — McMap. All rights reserved.