Get DOMRect Object From Clicked Element

I’m trying to get the DOMRect object from the element I clicked but since e.target is not an element, it does not return DOMRect. Can someone please suggest an alternative if I cannot use getBoundingClientRect with e.target to get DOMRect.

1 Like

e.target.getBoundingClientRect() is a valid call, assuming you’re binding your event to an element.

How are you binding the event?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.