GetElementRect

Gets the rectangle that contains element.

Syntax

function GetElementRect(aElement: TCSElement): TCSRect;

Parameters

  • aElement
    • type: TCSElement
    • functions: element, which rectangle is necessary to get

Returned value

  • type: TCSRect
  • functions: rectangle which contains an element

Notes

  • Rectangle coordinates are counted with respect to the upper-right corner of the browser window

Examples

  1. //Loading page google.ru
    LoadURI('google.ru');
    //Obtain element (request input field)
    var element:=GetElement('input',0,['class','id'],['gbqfif','gbqfq'],true);
    //Obtain the coordinates of the element rectangle
    var rect:=GetElementRect(element);