← Back to Browser domain

Browser.getWindowBounds

Get position and size of the browser window.

Domain: Browser experimental

Parameters

NameTypeDescription
windowIdWindowIDBrowser window id.

Returns

NameTypeDescription
boundsBoundsBounds information of the window. When window state is 'minimized', the restored window position and size are returned.

Example Request

{
  "id": 1,
  "method": "Browser.getWindowBounds",
  "params": {
    "windowId": "windowId-value"
  }
}

Example Response

{
  "id": 1,
  "result": {
    "bounds": "bounds-value"
  }
}

Usage in Node.js

const result = await send('Browser.getWindowBounds', {"windowId": "windowId-value"});
console.log(result);
// {"bounds": "bounds-value"}