polyline.intersectionWithLine(line)

Return an array of the intersection points of the polyline and the line. Return null if no intersection exists.