The DOM spec states that capturing events should not fire on target, because the idea of a capturing event is to detect events before they reach their targets. Because of bugs in Gecko and Safari, web content that is tested mostly with Firefox or other Gecko-based browsers sometimes expects capturing listeners to fire on target. Such content will fail in Opera 7, 8 and current releases of 9 because of its correct implementation of the standard. 大意是說:DOM規(guī)范中陳述了捕捉型的事件不應該在目標元素上被執(zhí)行,因為捕捉型事件的用意就是為了監(jiān)測到達目標元素之前的事件。Firefox和Safari的實現(xiàn)都是帶有bug的。
再來看看W3C的DOM Events規(guī)范中的原話:
A capturing EventListener will not be triggered by events dispatched directly to the EventTarget upon which it is registered. 所以,在整個事件傳播中,被執(zhí)行的順序是: