public function getDescendantNodeAtPosition(int $pos) {
        foreach ($this->getChildNodes() as $child) {
            if ($child->containsPosition($pos)) {
                $node = $child->getDescendantNodeAtPosition($pos);
                if (!is_null($node)) {
                    return $node;
                }
            }
        }

        return $this;
    }
public function getDescendantNodeAtPosition(int $pos) {
        foreach ($this->getChildNodes() as $child) {
            if ($child->containsPosition($pos)) {
                $node = $child->getDescendantNodeAtPosition($pos);
                if (!is_null($node)) {
                    return $node;
                }
            }
        }

        return $this;
    }
public function getDescendantNodeAtPosition ( int $ pos ) { foreach ( $ this -> getChildNodes ( ) as $ child ) { if ( $ child -> containsPosition ( $ pos ) ) { $ node = $ child -> getDescendantNodeAtPosition ( $ pos ) ; if ( ! is_null ( $ node ) ) { return $ node ; } } } return $ this ; }
Searches descendants to find a Node at the given position.

@param int $pos
@return Node
Searches descendants to find a Node at the given position .