← Back to Browser domain

Browser.setWindowBounds

Set position and/or size of the browser window.

Domain: Browser experimental

Parameters

NameTypeDescription
windowIdWindowIDBrowser window id.
boundsBoundsNew window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged.

Example Request

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

Example Response

{
  "id": 1,
  "result": {}
}

Usage in Node.js

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