GetHtmlRect Method (BrowserWindow)

Class

BrowserWindow.

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. We recommend to use 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 = browserWindow.GetHtmlRect()
Variable Description
htmlRect RECT.