(bookKeeping)
| 5973 | } |
| 5974 | |
| 5975 | function handleTopLevel(bookKeeping) { |
| 5976 | var targetInst = bookKeeping.targetInst; |
| 5977 | |
| 5978 | // Loop through the hierarchy, in case there's any nested components. |
| 5979 | // It's important that we build the array of ancestors before calling any |
| 5980 | // event handlers, because event handlers can modify the DOM, leading to |
| 5981 | // inconsistencies with ReactMount's node cache. See #1105. |
| 5982 | var ancestor = targetInst; |
| 5983 | do { |
| 5984 | if (!ancestor) { |
| 5985 | bookKeeping.ancestors.push(ancestor); |
| 5986 | break; |
| 5987 | } |
| 5988 | var root = findRootContainerNode(ancestor); |
| 5989 | if (!root) { |
| 5990 | break; |
| 5991 | } |
| 5992 | bookKeeping.ancestors.push(ancestor); |
| 5993 | ancestor = getClosestInstanceFromNode(root); |
| 5994 | } while (ancestor); |
| 5995 | |
| 5996 | for (var i = 0; i < bookKeeping.ancestors.length; i++) { |
| 5997 | targetInst = bookKeeping.ancestors[i]; |
| 5998 | runExtractedEventsInBatch(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent)); |
| 5999 | } |
| 6000 | } |
| 6001 | |
| 6002 | // TODO: can we stop exporting these? |
| 6003 | var _enabled = true; |
nothing calls this directly
no test coverage detected