* Simulates the traversal of a two-phase, capture/bubble event dispatch.
(inst, fn, arg)
| 2454 | * Simulates the traversal of a two-phase, capture/bubble event dispatch. |
| 2455 | */ |
| 2456 | function traverseTwoPhase(inst, fn, arg) { |
| 2457 | var path = []; |
| 2458 | while (inst) { |
| 2459 | path.push(inst); |
| 2460 | inst = getParent(inst); |
| 2461 | } |
| 2462 | var i = void 0; |
| 2463 | for (i = path.length; i-- > 0;) { |
| 2464 | fn(path[i], 'captured', arg); |
| 2465 | } |
| 2466 | for (i = 0; i < path.length; i++) { |
| 2467 | fn(path[i], 'bubbled', arg); |
| 2468 | } |
| 2469 | } |
| 2470 | |
| 2471 | /** |
| 2472 | * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that |
no test coverage detected