* Simulates the traversal of a two-phase, capture/bubble event dispatch.
(inst, fn, arg)
| 2832 | * Simulates the traversal of a two-phase, capture/bubble event dispatch. |
| 2833 | */ |
| 2834 | function traverseTwoPhase(inst, fn, arg) { |
| 2835 | var path = []; |
| 2836 | while (inst) { |
| 2837 | path.push(inst); |
| 2838 | inst = getParent(inst); |
| 2839 | } |
| 2840 | var i = void 0; |
| 2841 | for (i = path.length; i-- > 0;) { |
| 2842 | fn(path[i], 'captured', arg); |
| 2843 | } |
| 2844 | for (i = 0; i < path.length; i++) { |
| 2845 | fn(path[i], 'bubbled', arg); |
| 2846 | } |
| 2847 | } |
| 2848 | |
| 2849 | /** |
| 2850 | * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that |
no test coverage detected