(finishedWork: FiberNode)
| 428 | } |
| 429 | |
| 430 | const commitPlacement = (finishedWork: FiberNode) => { |
| 431 | if (__DEV__) { |
| 432 | console.warn('执行Placement操作', finishedWork); |
| 433 | } |
| 434 | // parent DOM |
| 435 | const hostParent = getHostParent(finishedWork); |
| 436 | |
| 437 | // host sibling |
| 438 | const sibling = getHostSibling(finishedWork); |
| 439 | |
| 440 | // finishedWork ~~ DOM append parent DOM |
| 441 | if (hostParent !== null) { |
| 442 | insertOrAppendPlacementNodeIntoContainer(finishedWork, hostParent, sibling); |
| 443 | } |
| 444 | }; |
| 445 | |
| 446 | function getHostSibling(fiber: FiberNode) { |
| 447 | let node: FiberNode = fiber; |
no test coverage detected