Chrome Remote Interface v0.0.1 ChromeRemoteInterface.RPC.Emulation View Source
This domain emulates different environments for the page.
Link to this section Summary
Functions
Tells whether emulation is supported
Clears the overriden device metrics
Clears the overriden Geolocation Position and Error
Overrides the visible area of the page. The change is hidden from the page, i.e. the observable scroll position and page scale does not change. In effect, the command moves the specified area of the page into the top-left corner of the frame
Requests that page scale factor is reset to initial values
Resets the visible area of the page to the original viewport, undoing any effects of the forceViewport
command
Enables CPU throttling to emulate slow CPUs
Sets or clears an override of the default background color of the frame. This override is used if the content does not specify one
Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and “device-width”/“device-height”-related CSS media query results)
Emulates the given media for CSS media queries
Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable
Sets a specified page scale factor
Switches script execution in the page
Toggles mouse event-based touch event emulation
Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets the current virtual time policy. Note this supersedes any previous time budget
Resizes the frame/viewport of the page. Note that this does not affect the frame’s container (e.g. browser window). Can be used to produce screenshots of the specified size. Not supported on Android
Link to this section Functions
Tells whether emulation is supported.
Parameters:
Clears the overriden device metrics.
Parameters:
Clears the overriden Geolocation Position and Error.
Parameters:
Overrides the visible area of the page. The change is hidden from the page, i.e. the observable scroll position and page scale does not change. In effect, the command moves the specified area of the page into the top-left corner of the frame.
Parameters:
x -
Requests that page scale factor is reset to initial values.
Parameters:
Resets the visible area of the page to the original viewport, undoing any effects of the forceViewport
command.
Parameters:
Enables CPU throttling to emulate slow CPUs.
Parameters:
rate -
Sets or clears an override of the default background color of the frame. This override is used if the content does not specify one.
Parameters:
color -
Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and “device-width”/“device-height”-related CSS media query results).
Parameters:
width -
Emulates the given media for CSS media queries.
Parameters:
media -
Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.
Parameters:
latitude -
Sets a specified page scale factor.
Parameters:
pageScaleFactor -
Switches script execution in the page.
Parameters:
value -
Toggles mouse event-based touch event emulation.
Parameters:
enabled -
Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets the current virtual time policy. Note this supersedes any previous time budget.
Parameters:
policy -
Resizes the frame/viewport of the page. Note that this does not affect the frame’s container (e.g. browser window). Can be used to produce screenshots of the specified size. Not supported on Android.
Parameters:
width -