def getCommonAncestor(rng):
    """
    Get lowest common ancestor element of the given js range

    @param range js range to get ancestor element of
    @return the lowest element that completely encompasses the range
    """
    return rng.commonAncestorContainer