GetHtmlRect Method (DomElement)

Class

DomCheckBox.

Action

Retrieves the rectangle of a DomElement relative to the BrowserWindow in HTML pixels. In contrast to the screen coordinates that are provided by the GetRect function, the coordinates provided by GetHtmlRect are not effected by the zoom level on mobile browsers. The click function also uses HTML pixel coordinates for any DomElement. Micro Focus recommends using GetHtmlRect for all position calculations within the browser. This will ensure that your scripts are cross-browser capable and your position calculations are not effected by changing zoom levels on mobile browsers.

Availability

This functionality is supported only if you are using the Open Agent.

Syntax

htmlRect = element.GetHtmlRect()
Variable Description
htmlRect RECT.