* Simulates the traversal of a two-phase, capture/bubble event dispatch.
(inst, fn, arg)
| 2719 | * Simulates the traversal of a two-phase, capture/bubble event dispatch. |
| 2720 | */ |
| 2721 | function traverseTwoPhase(inst, fn, arg) { |
| 2722 | var path = []; |
| 2723 | while (inst) { |
| 2724 | path.push(inst); |
| 2725 | inst = getParent(inst); |
| 2726 | } |
| 2727 | var i = void 0; |
| 2728 | for (i = path.length; i-- > 0;) { |
| 2729 | fn(path[i], 'captured', arg); |
| 2730 | } |
| 2731 | for (i = 0; i < path.length; i++) { |
| 2732 | fn(path[i], 'bubbled', arg); |
| 2733 | } |
| 2734 | } |
| 2735 | |
| 2736 | /** |
| 2737 | * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that |
no test coverage detected