(bookKeeping)
| 5068 | } |
| 5069 | |
| 5070 | function handleTopLevel(bookKeeping) { |
| 5071 | var targetInst = bookKeeping.targetInst; |
| 5072 | |
| 5073 | // Loop through the hierarchy, in case there's any nested components. |
| 5074 | // It's important that we build the array of ancestors before calling any |
| 5075 | // event handlers, because event handlers can modify the DOM, leading to |
| 5076 | // inconsistencies with ReactMount's node cache. See #1105. |
| 5077 | var ancestor = targetInst; |
| 5078 | do { |
| 5079 | if (!ancestor) { |
| 5080 | bookKeeping.ancestors.push(ancestor); |
| 5081 | break; |
| 5082 | } |
| 5083 | var root = findRootContainerNode(ancestor); |
| 5084 | if (!root) { |
| 5085 | break; |
| 5086 | } |
| 5087 | bookKeeping.ancestors.push(ancestor); |
| 5088 | ancestor = getClosestInstanceFromNode(root); |
| 5089 | } while (ancestor); |
| 5090 | |
| 5091 | for (var i = 0; i < bookKeeping.ancestors.length; i++) { |
| 5092 | targetInst = bookKeeping.ancestors[i]; |
| 5093 | runExtractedEventsInBatch(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent)); |
| 5094 | } |
| 5095 | } |
| 5096 | |
| 5097 | // TODO: can we stop exporting these? |
| 5098 | var _enabled = true; |
nothing calls this directly
no test coverage detected