* Simulates the traversal of a two-phase, capture/bubble event dispatch.
(inst, fn, arg)
| 2674 | * Simulates the traversal of a two-phase, capture/bubble event dispatch. |
| 2675 | */ |
| 2676 | function traverseTwoPhase(inst, fn, arg) { |
| 2677 | var path = []; |
| 2678 | while (inst) { |
| 2679 | path.push(inst); |
| 2680 | inst = getParent(inst); |
| 2681 | } |
| 2682 | var i = void 0; |
| 2683 | for (i = path.length; i-- > 0;) { |
| 2684 | fn(path[i], 'captured', arg); |
| 2685 | } |
| 2686 | for (i = 0; i < path.length; i++) { |
| 2687 | fn(path[i], 'bubbled', arg); |
| 2688 | } |
| 2689 | } |
| 2690 | |
| 2691 | /** |
| 2692 | * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that |
no test coverage detected