← Back to Emulation domain

Emulation.setPrimaryScreen

Set primary screen. Only supported in headless mode. Note that this changes the coordinate system origin to the top-left of the new primary screen, updating the bounds and work areas of all existing screens accordingly.

Domain: Emulation experimental

Parameters

NameTypeDescription
screenIdScreenId

Example Request

{
  "id": 1,
  "method": "Emulation.setPrimaryScreen",
  "params": {
    "screenId": "screenId-value"
  }
}

Example Response

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

Usage in Node.js

const result = await send('Emulation.setPrimaryScreen', {"screenId": "screenId-value"});
console.log(result);