Skip to main content
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

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.
enum
required
One of: device, viewport, cpu, network, geolocation, media, locale, vision, animations, status, reset.
string
device: iphone-14, iphone-se, pixel-7, ipad, desktop · network: none, offline, slow3g, fast3g, 4g
integer
 
integer
 
number
 
boolean
 
boolean
 
string
 
number
cpu: slowdown factor, 1 = none
number
 
number
 
number
 
boolean
 
enum
One of: light, dark.
enum
One of: reduce, no-preference.
enum
One of: active, none.
enum
One of: more, less, no-preference.
enum
One of: screen, print.
string
 
string
 
enum
One of: none, achromatopsia, blurredVision, deuteranopia, protanopia, tritanopia, reducedContrast.
number
 
boolean
device/viewport: also resize the browser window to the device size so the emulated viewport fills it (default true). reset restores the window.

Example

Device preset
Custom viewport
Dark mode and reduced motion
Throttle the CPU 4x