(bookKeeping)
| 5159 | } |
| 5160 | |
| 5161 | function handleTopLevel(bookKeeping) { |
| 5162 | var targetInst = bookKeeping.targetInst; |
| 5163 | |
| 5164 | // Loop through the hierarchy, in case there's any nested components. |
| 5165 | // It's important that we build the array of ancestors before calling any |
| 5166 | // event handlers, because event handlers can modify the DOM, leading to |
| 5167 | // inconsistencies with ReactMount's node cache. See #1105. |
| 5168 | var ancestor = targetInst; |
| 5169 | do { |
| 5170 | if (!ancestor) { |
| 5171 | bookKeeping.ancestors.push(ancestor); |
| 5172 | break; |
| 5173 | } |
| 5174 | var root = findRootContainerNode(ancestor); |
| 5175 | if (!root) { |
| 5176 | break; |
| 5177 | } |
| 5178 | bookKeeping.ancestors.push(ancestor); |
| 5179 | ancestor = getClosestInstanceFromNode(root); |
| 5180 | } while (ancestor); |
| 5181 | |
| 5182 | for (var i = 0; i < bookKeeping.ancestors.length; i++) { |
| 5183 | targetInst = bookKeeping.ancestors[i]; |
| 5184 | runExtractedEventsInBatch(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent)); |
| 5185 | } |
| 5186 | } |
| 5187 | |
| 5188 | // TODO: can we stop exporting these? |
| 5189 | var _enabled = true; |
nothing calls this directly
no test coverage detected