isPointInStroke

fun isPointInStroke(point: DOMPointReadOnly = definedExternally): Boolean(source)

The isPointInStroke() method of the SVGGeometryElement interface determines whether a given point is within the stroke shape of an element. The point argument is interpreted as a point in the local coordinate system of the element.

MDN Reference