* Simulates the traversal of a two-phase, capture/bubble event dispatch.
(inst, fn, arg)
| 8146 | */ |
| 8147 | |
| 8148 | function traverseTwoPhase(inst, fn, arg) { |
| 8149 | var path = []; |
| 8150 | |
| 8151 | while (inst) { |
| 8152 | path.push(inst); |
| 8153 | inst = getParent(inst); |
| 8154 | } |
| 8155 | |
| 8156 | var i; |
| 8157 | |
| 8158 | for (i = path.length; i-- > 0;) { |
| 8159 | fn(path[i], 'captured', arg); |
| 8160 | } |
| 8161 | |
| 8162 | for (i = 0; i < path.length; i++) { |
| 8163 | fn(path[i], 'bubbled', arg); |
| 8164 | } |
| 8165 | } |
| 8166 | /** |
| 8167 | * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that |
| 8168 | * should would receive a `mouseEnter` or `mouseLeave` event. |
no test coverage detected