I learned a little trick the other week and thought I’d share. Sometimes you might need to listen to a non-bubbling event “up the chain” somewhere, but of course, since it is not bubbling, that can be hard. The trick is that event events that don’t have bubbling still have the capture phase, so if you flip that capture flag to true in the event listener then you can now listen to any events dispatched by any child views whether they are bubbling or not. Example:

// listen for some event (this one is even custom) that does not bubble // make sure to set true on capture stage.addEventListener("customNonBubbling", myListener, true); ...

If you’re listening on the capture phase then the closer you are to root, the sooner you’ll handle the event. If you’re just listening normally then the closer you are to the target the sooner you’ll handle the event.