Event capture precedes the event bubbling, and its sequence of events reaching a node is opposite to that of event bubbling. The capture-bind and capture-catch keywords can be used to listen for events in the capture phase. The latter keyword interrupts both the capture and bubbling phases.
<view id="view1" bind:touchstart="handleTap1" capture-bind:touchstart="handleTap2">
view1
<view id="view3" bind:touchstart="handleTap3" capture-bind:touchstart="handleTap4">
view3
</view>
</view> Effect:
When view3 is tapped, handleTap2, handleTap4, handleTap3 and handleTap1 are called in sequence.
Example 2: (Change the first capture-bind in example 1 to capture-catch.)
<view id="view1" bind:touchstart="handleTap1" capture-catch:touchstart="handleTap2">
view1
<view id="view3" bind:touchstart="handleTap3" capture-bind:touchstart="handleTap4">
view3
</view>
</view> Effect:
When view3 is tapped, only handleTap2 is triggered.