device.getElementBounds

getElementBounds(element: string | HTMLElement) → {DOMRect}

returns the size of the given HTMLElement and its position relative to the viewport

See: https://developer.mozilla.org/en-US/docs/Web/API/DOMRect
Parameters:
Name Type Description
element string | HTMLElement

an HTMLElement object

Returns:
Type Description
DOMRect

the size and position of the element relatively to the viewport

Powered by webdoc!