getElementRect function

Return the dimensions and coordinates of an element