← Back to Emulation domain

Emulation.setSmallViewportHeightDifferenceOverride

Allows overriding the difference between the small and large viewport sizes, which determine the value of the `svh` and `lvh` unit, respectively. Only supported for top-level frames.

Domain: Emulation experimental

Parameters

NameTypeDescription
differenceintegerThis will cause an element of size 100svh to be `difference` pixels smaller than an element of size 100lvh.

Example Request

{
  "id": 1,
  "method": "Emulation.setSmallViewportHeightDifferenceOverride",
  "params": {
    "difference": 1
  }
}

Example Response

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

Usage in Node.js

const result = await send('Emulation.setSmallViewportHeightDifferenceOverride', {"difference": 1});
console.log(result);