It can look at the element position and return the coordinates of its four corners.
The object can check if the element corners are outside the container element coordinates, as well move the element to a new position inside its container element.
corners detector plugin page.