( lView: LView, lViewOrLContainer: T, )
| 316 | * @returns The state passed in |
| 317 | */ |
| 318 | export function addToEndOfViewTree<T extends LView | LContainer>( |
| 319 | lView: LView, |
| 320 | lViewOrLContainer: T, |
| 321 | ): T { |
| 322 | // TODO(benlesh/misko): This implementation is incorrect, because it always adds the LContainer |
| 323 | // to the end of the queue, which means if the developer retrieves the LContainers from RNodes out |
| 324 | // of order, the change detection will run out of order, as the act of retrieving the |
| 325 | // LContainer from the RNode is what adds it to the queue. |
| 326 | if (lView[CHILD_HEAD]) { |
| 327 | lView[CHILD_TAIL]![NEXT] = lViewOrLContainer; |
| 328 | } else { |
| 329 | lView[CHILD_HEAD] = lViewOrLContainer; |
| 330 | } |
| 331 | lView[CHILD_TAIL] = lViewOrLContainer; |
| 332 | return lViewOrLContainer; |
| 333 | } |
no outgoing calls
no test coverage detected