問題文
A click happens on a button that sits inside a nested set of elements, and every ancestor has a click listener registered with the default options. In which order do the listeners run?
選択肢
- The order depends on the order in which the listeners were registered, regardless of the position in the tree.
- Only the listener on the target runs, and the ancestors stay out of the delivery sequence.
- The target first, then each ancestor outwards, because listeners registered with the default options run during the bubbling phase.
- The outermost ancestor first and the target last, and the default registration takes part in that downward walk from the document.