(bookKeeping)
| 6086 | } |
| 6087 | |
| 6088 | function handleTopLevel(bookKeeping) { |
| 6089 | var targetInst = bookKeeping.targetInst; |
| 6090 | |
| 6091 | // Loop through the hierarchy, in case there's any nested components. |
| 6092 | // It's important that we build the array of ancestors before calling any |
| 6093 | // event handlers, because event handlers can modify the DOM, leading to |
| 6094 | // inconsistencies with ReactMount's node cache. See #1105. |
| 6095 | var ancestor = targetInst; |
| 6096 | do { |
| 6097 | if (!ancestor) { |
| 6098 | bookKeeping.ancestors.push(ancestor); |
| 6099 | break; |
| 6100 | } |
| 6101 | var root = findRootContainerNode(ancestor); |
| 6102 | if (!root) { |
| 6103 | break; |
| 6104 | } |
| 6105 | bookKeeping.ancestors.push(ancestor); |
| 6106 | ancestor = getClosestInstanceFromNode(root); |
| 6107 | } while (ancestor); |
| 6108 | |
| 6109 | for (var i = 0; i < bookKeeping.ancestors.length; i++) { |
| 6110 | targetInst = bookKeeping.ancestors[i]; |
| 6111 | runExtractedEventsInBatch(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent)); |
| 6112 | } |
| 6113 | } |
| 6114 | |
| 6115 | // TODO: can we stop exporting these? |
| 6116 | var _enabled = true; |
nothing calls this directly
no test coverage detected