* Simulates the traversal of a two-phase, capture/bubble event dispatch.
(inst, fn, arg)
| 1942 | * Simulates the traversal of a two-phase, capture/bubble event dispatch. |
| 1943 | */ |
| 1944 | function traverseTwoPhase(inst, fn, arg) { |
| 1945 | var path = []; |
| 1946 | while (inst) { |
| 1947 | path.push(inst); |
| 1948 | inst = getParent(inst); |
| 1949 | } |
| 1950 | var i = void 0; |
| 1951 | for (i = path.length; i-- > 0;) { |
| 1952 | fn(path[i], 'captured', arg); |
| 1953 | } |
| 1954 | for (i = 0; i < path.length; i++) { |
| 1955 | fn(path[i], 'bubbled', arg); |
| 1956 | } |
| 1957 | } |
| 1958 | |
| 1959 | /** |
| 1960 | * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that |
no test coverage detected