* Simulates the traversal of a two-phase, capture/bubble event dispatch.
(inst, fn, arg)
| 2581 | * Simulates the traversal of a two-phase, capture/bubble event dispatch. |
| 2582 | */ |
| 2583 | function traverseTwoPhase(inst, fn, arg) { |
| 2584 | var path = []; |
| 2585 | while (inst) { |
| 2586 | path.push(inst); |
| 2587 | inst = getParent(inst); |
| 2588 | } |
| 2589 | var i = void 0; |
| 2590 | for (i = path.length; i-- > 0;) { |
| 2591 | fn(path[i], 'captured', arg); |
| 2592 | } |
| 2593 | for (i = 0; i < path.length; i++) { |
| 2594 | fn(path[i], 'bubbled', arg); |
| 2595 | } |
| 2596 | } |
| 2597 | |
| 2598 | /** |
| 2599 | * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that |
no test coverage detected