(child: ViewBase)
| 142 | |
| 143 | let retVal: ViewBase; |
| 144 | const descendantsCallback = function (child: ViewBase): boolean { |
| 145 | if (child.id === id) { |
| 146 | retVal = child; |
| 147 | |
| 148 | // break the iteration by returning false |
| 149 | return false; |
| 150 | } |
| 151 | |
| 152 | return true; |
| 153 | }; |
| 154 | |
| 155 | eachDescendant(view, descendantsCallback); |
| 156 |