My task is to record the starting coordinates (x,y)
and ending coordinates (x,y)
of a mouse event. For example, on an HTML page with an image, users should be able to select a specific area by dragging the mouse.
Therefore, I need to capture the coordinates where the selection starts and ends.