(bookKeeping)
| 5870 | } |
| 5871 | |
| 5872 | function handleTopLevel(bookKeeping) { |
| 5873 | var targetInst = bookKeeping.targetInst; |
| 5874 | |
| 5875 | // Loop through the hierarchy, in case there's any nested components. |
| 5876 | // It's important that we build the array of ancestors before calling any |
| 5877 | // event handlers, because event handlers can modify the DOM, leading to |
| 5878 | // inconsistencies with ReactMount's node cache. See #1105. |
| 5879 | var ancestor = targetInst; |
| 5880 | do { |
| 5881 | if (!ancestor) { |
| 5882 | bookKeeping.ancestors.push(ancestor); |
| 5883 | break; |
| 5884 | } |
| 5885 | var root = findRootContainerNode(ancestor); |
| 5886 | if (!root) { |
| 5887 | break; |
| 5888 | } |
| 5889 | bookKeeping.ancestors.push(ancestor); |
| 5890 | ancestor = getClosestInstanceFromNode(root); |
| 5891 | } while (ancestor); |
| 5892 | |
| 5893 | for (var i = 0; i < bookKeeping.ancestors.length; i++) { |
| 5894 | targetInst = bookKeeping.ancestors[i]; |
| 5895 | runExtractedEventsInBatch(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent)); |
| 5896 | } |
| 5897 | } |
| 5898 | |
| 5899 | // TODO: can we stop exporting these? |
| 5900 | var _enabled = true; |
nothing calls this directly
no test coverage detected