* Simulates the traversal of a two-phase, capture/bubble event dispatch.
(inst, fn, arg)
| 1814 | * Simulates the traversal of a two-phase, capture/bubble event dispatch. |
| 1815 | */ |
| 1816 | function traverseTwoPhase(inst, fn, arg) { |
| 1817 | var path = []; |
| 1818 | while (inst) { |
| 1819 | path.push(inst); |
| 1820 | inst = getParent(inst); |
| 1821 | } |
| 1822 | var i = void 0; |
| 1823 | for (i = path.length; i-- > 0;) { |
| 1824 | fn(path[i], 'captured', arg); |
| 1825 | } |
| 1826 | for (i = 0; i < path.length; i++) { |
| 1827 | fn(path[i], 'bubbled', arg); |
| 1828 | } |
| 1829 | } |
| 1830 | |
| 1831 | /** |
| 1832 | * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that |
no test coverage detected