I have a rectangle that is drawn using canvas. I know its startPosition(x: 731, y: 13)
and endPosition(x: 768, y: 113)
. Can I get this element using JavaScript?
Here I got a JavaScript function document.elementFromPoint(x, y)
, but it doesn't serve my purpose, because it doesn't accept start and end position.
Can anybody give me idea of how can I retrieve my HTML rectangle element?