> ## Documentation Index
> Fetch the complete documentation index at: https://docs.browspark.krishm.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# devtools_emulation

> Device and rendering emulation.

Device and rendering emulation. device (preset or custom viewport, scale, touch, user agent), viewport, cpu (throttle rate), network (preset), geolocation, media (color scheme, reduced motion, forced colors, print), locale/timezone, vision (deficiency), animations (playback rate, list observed), status, reset. Everything is undone by devtools\_session stop or action:reset.

## Parameters

<ParamField body="tabId" type="integer">
  Target tab id from browser\_tabs, which lists tabs across all windows. Defaults to the agent's most recently opened usable tab, or the only usable tab. Otherwise select a listed tabId.
</ParamField>

<ParamField body="action" type="enum" required>
  One of: `device`, `viewport`, `cpu`, `network`, `geolocation`, `media`, `locale`, `vision`, `animations`, `status`, `reset`.
</ParamField>

<ParamField body="preset" type="string">
  device: iphone-14, iphone-se, pixel-7, ipad, desktop · network: none, offline, slow3g, fast3g, 4g
</ParamField>

<ParamField body="width" type="integer">
   
</ParamField>

<ParamField body="height" type="integer">
   
</ParamField>

<ParamField body="scale" type="number">
   
</ParamField>

<ParamField body="mobile" type="boolean">
   
</ParamField>

<ParamField body="touch" type="boolean">
   
</ParamField>

<ParamField body="userAgent" type="string">
   
</ParamField>

<ParamField body="rate" type="number">
  cpu: slowdown factor, 1 = none
</ParamField>

<ParamField body="latitude" type="number">
   
</ParamField>

<ParamField body="longitude" type="number">
   
</ParamField>

<ParamField body="accuracy" type="number">
   
</ParamField>

<ParamField body="clear" type="boolean">
   
</ParamField>

<ParamField body="colorScheme" type="enum">
  One of: `light`, `dark`.
</ParamField>

<ParamField body="reducedMotion" type="enum">
  One of: `reduce`, `no-preference`.
</ParamField>

<ParamField body="forcedColors" type="enum">
  One of: `active`, `none`.
</ParamField>

<ParamField body="contrast" type="enum">
  One of: `more`, `less`, `no-preference`.
</ParamField>

<ParamField body="media" type="enum">
  One of: `screen`, `print`.
</ParamField>

<ParamField body="locale" type="string">
   
</ParamField>

<ParamField body="timezone" type="string">
   
</ParamField>

<ParamField body="deficiency" type="enum">
  One of: `none`, `achromatopsia`, `blurredVision`, `deuteranopia`, `protanopia`, `tritanopia`, `reducedContrast`.
</ParamField>

<ParamField body="playbackRate" type="number">
   
</ParamField>

<ParamField body="resizeWindow" type="boolean">
  device/viewport: also resize the browser window to the device size so the emulated viewport fills it (default true). reset restores the window.
</ParamField>

## Example

```json Device preset theme={null}
{
  "tabId": 1234,
  "action": "device",
  "preset": "iphone-14"
}
```

```json Custom viewport theme={null}
{
  "tabId": 1234,
  "action": "device",
  "width": 390,
  "height": 844,
  "scale": 3,
  "mobile": true,
  "touch": true
}
```

```json Dark mode and reduced motion theme={null}
{
  "tabId": 1234,
  "action": "media",
  "colorScheme": "dark",
  "reducedMotion": "reduce"
}
```

```json Throttle the CPU 4x theme={null}
{
  "tabId": 1234,
  "action": "cpu",
  "rate": 4
}
```

```json theme={null}
{
  "tabId": 1234,
  "action": "reset"
}
```
