Detect whether a polyline is falling within or intersecting with a polygon

I have a list of polygons. Is it possible to detect whether a line intersects with one of the polygons?

I checked the IntersectionTests function I don’t think it will help in my case
IntersectionTests - Cesium Documentation.

Any suggestion or code example is appreciated.