* @param {DOMElement|DOMDocument} container DOM element that may contain * a React component * @return {?*} DOM element that may have the reactRoot ID, or null.
(container)
| 11164 | * @return {?*} DOM element that may have the reactRoot ID, or null. |
| 11165 | */ |
| 11166 | function getReactRootElementInContainer(container) { |
| 11167 | if (!container) { |
| 11168 | return null; |
| 11169 | } |
| 11170 | |
| 11171 | if (container.nodeType === DOC_NODE_TYPE) { |
| 11172 | return container.documentElement; |
| 11173 | } else { |
| 11174 | return container.firstChild; |
| 11175 | } |
| 11176 | } |
| 11177 | |
| 11178 | function internalGetID(node) { |
| 11179 | // If node is something like a window, document, or text node, none of |
no outgoing calls
no test coverage detected
searching dependent graphs…