(bookKeeping)
| 5928 | } |
| 5929 | |
| 5930 | function handleTopLevel(bookKeeping) { |
| 5931 | var targetInst = bookKeeping.targetInst; |
| 5932 | |
| 5933 | // Loop through the hierarchy, in case there's any nested components. |
| 5934 | // It's important that we build the array of ancestors before calling any |
| 5935 | // event handlers, because event handlers can modify the DOM, leading to |
| 5936 | // inconsistencies with ReactMount's node cache. See #1105. |
| 5937 | var ancestor = targetInst; |
| 5938 | do { |
| 5939 | if (!ancestor) { |
| 5940 | bookKeeping.ancestors.push(ancestor); |
| 5941 | break; |
| 5942 | } |
| 5943 | var root = findRootContainerNode(ancestor); |
| 5944 | if (!root) { |
| 5945 | break; |
| 5946 | } |
| 5947 | bookKeeping.ancestors.push(ancestor); |
| 5948 | ancestor = getClosestInstanceFromNode(root); |
| 5949 | } while (ancestor); |
| 5950 | |
| 5951 | for (var i = 0; i < bookKeeping.ancestors.length; i++) { |
| 5952 | targetInst = bookKeeping.ancestors[i]; |
| 5953 | runExtractedEventsInBatch(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent)); |
| 5954 | } |
| 5955 | } |
| 5956 | |
| 5957 | // TODO: can we stop exporting these? |
| 5958 | var _enabled = true; |
nothing calls this directly
no test coverage detected