(inst)
| 2548 | }); |
| 2549 | |
| 2550 | function getParent(inst) { |
| 2551 | do { |
| 2552 | inst = inst['return']; |
| 2553 | // TODO: If this is a HostRoot we might want to bail out. |
| 2554 | // That is depending on if we want nested subtrees (layers) to bubble |
| 2555 | // events to their parent. We could also go through parentNode on the |
| 2556 | // host node but that wouldn't work for React Native and doesn't let us |
| 2557 | // do the portal feature. |
| 2558 | } while (inst && inst.tag !== HostComponent); |
| 2559 | if (inst) { |
| 2560 | return inst; |
| 2561 | } |
| 2562 | return null; |
| 2563 | } |
| 2564 | |
| 2565 | /** |
| 2566 | * Return the lowest common ancestor of A and B, or null if they are in |
no outgoing calls
no test coverage detected