* Simulates the traversal of a two-phase, capture/bubble event dispatch.
(inst, fn, arg)
| 1905 | * Simulates the traversal of a two-phase, capture/bubble event dispatch. |
| 1906 | */ |
| 1907 | function traverseTwoPhase(inst, fn, arg) { |
| 1908 | var path = []; |
| 1909 | while (inst) { |
| 1910 | path.push(inst); |
| 1911 | inst = getParent(inst); |
| 1912 | } |
| 1913 | var i = void 0; |
| 1914 | for (i = path.length; i-- > 0;) { |
| 1915 | fn(path[i], 'captured', arg); |
| 1916 | } |
| 1917 | for (i = 0; i < path.length; i++) { |
| 1918 | fn(path[i], 'bubbled', arg); |
| 1919 | } |
| 1920 | } |
| 1921 | |
| 1922 | /** |
| 1923 | * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that |
no test coverage detected