It seems event listeners fire in the wrong order when `useCapture = true`. See [this Fiddle](http://jsfiddle.net/lazd/wazfeg0k/1/). With this markup: ``` html <div id="node0"> <div id="node1"> <div id="node2"> </div> </div> </div> ``` And with listeners added on the capture phase: ``` js var events = new domDelegate.Delegate(document.querySelector('#node0')); events.on('click', handler0, true); events.on('click', '#node1', handler1, true); events.on('click', '#node2', handler2, true); ``` For an event triggered on `#node2`: ``` js document.querySelector('#node2').click(); ``` One would expect the following call order, which matches that of native event listeners. - `handler0` - `handler1` - `handler2` Instead, we get: - `handler2` - `handler1` - `handler0`
It seems event listeners fire in the wrong order when
useCapture = true. See this Fiddle.With this markup:
And with listeners added on the capture phase:
For an event triggered on
#node2:One would expect the following call order, which matches that of native event listeners.
handler0handler1handler2Instead, we get:
handler2handler1handler0