* Simulates the traversal of a two-phase, capture/bubble event dispatch.
(inst, fn, arg)
| 2616 | * Simulates the traversal of a two-phase, capture/bubble event dispatch. |
| 2617 | */ |
| 2618 | function traverseTwoPhase(inst, fn, arg) { |
| 2619 | var path = []; |
| 2620 | while (inst) { |
| 2621 | path.push(inst); |
| 2622 | inst = getParent(inst); |
| 2623 | } |
| 2624 | var i = void 0; |
| 2625 | for (i = path.length; i-- > 0;) { |
| 2626 | fn(path[i], 'captured', arg); |
| 2627 | } |
| 2628 | for (i = 0; i < path.length; i++) { |
| 2629 | fn(path[i], 'bubbled', arg); |
| 2630 | } |
| 2631 | } |
| 2632 | |
| 2633 | /** |
| 2634 | * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that |
no test coverage detected