* Checks if `node` is a descendant of `ancestor` within the SAME view. * * Since we are in the same view, we can safely use `tNode.parent` to determine * if `ancestor` is an ancestor of the current `node`.
(node: TNode, ancestor: TNode)
| 212 | * if `ancestor` is an ancestor of the current `node`. |
| 213 | */ |
| 214 | function isTNodeDescendant(node: TNode, ancestor: TNode): boolean { |
| 215 | let curr: TNode | null = node; |
| 216 | while (curr) { |
| 217 | if (curr === ancestor) return true; |
| 218 | curr = curr.parent; |
| 219 | } |
| 220 | return false; |
| 221 | } |
| 222 | |
| 223 | /** |
| 224 | * Checks if `lView` is a descendant of `parentTNode` in `parentLView` (crossing view boundaries). |
no outgoing calls
no test coverage detected
searching dependent graphs…