(bookKeeping)
| 5835 | } |
| 5836 | |
| 5837 | function handleTopLevel(bookKeeping) { |
| 5838 | var targetInst = bookKeeping.targetInst; |
| 5839 | |
| 5840 | // Loop through the hierarchy, in case there's any nested components. |
| 5841 | // It's important that we build the array of ancestors before calling any |
| 5842 | // event handlers, because event handlers can modify the DOM, leading to |
| 5843 | // inconsistencies with ReactMount's node cache. See #1105. |
| 5844 | var ancestor = targetInst; |
| 5845 | do { |
| 5846 | if (!ancestor) { |
| 5847 | bookKeeping.ancestors.push(ancestor); |
| 5848 | break; |
| 5849 | } |
| 5850 | var root = findRootContainerNode(ancestor); |
| 5851 | if (!root) { |
| 5852 | break; |
| 5853 | } |
| 5854 | bookKeeping.ancestors.push(ancestor); |
| 5855 | ancestor = getClosestInstanceFromNode(root); |
| 5856 | } while (ancestor); |
| 5857 | |
| 5858 | for (var i = 0; i < bookKeeping.ancestors.length; i++) { |
| 5859 | targetInst = bookKeeping.ancestors[i]; |
| 5860 | runExtractedEventsInBatch(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent)); |
| 5861 | } |
| 5862 | } |
| 5863 | |
| 5864 | // TODO: can we stop exporting these? |
| 5865 | var _enabled = true; |
nothing calls this directly
no test coverage detected