Chrome Remote Interface v0.4.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.
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.
Switches script execution in the page.
Enables touch on platforms which do not support them.
Allows overriding user agent with the given string.
Link to this section Functions
canEmulate(page_pid) View Source
Tells whether emulation is supported.
Parameters:
canEmulate(page_pid, parameters) View Source
canEmulate(page_pid, parameters, opts) View Source
clearDeviceMetricsOverride(page_pid) View Source
Clears the overriden device metrics.
Parameters:
clearDeviceMetricsOverride(page_pid, parameters) View Source
clearDeviceMetricsOverride(page_pid, parameters, opts) View Source
clearGeolocationOverride(page_pid) View Source
Clears the overriden Geolocation Position and Error.
Parameters:
clearGeolocationOverride(page_pid, parameters) View Source
clearGeolocationOverride(page_pid, parameters, opts) View Source
experimental?() View Source
setDefaultBackgroundColorOverride(page_pid) View Source
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 -
setDefaultBackgroundColorOverride(page_pid, parameters) View Source
setDefaultBackgroundColorOverride(page_pid, parameters, opts) View Source
setDeviceMetricsOverride(page_pid) View Source
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 -
setDeviceMetricsOverride(page_pid, parameters) View Source
setDeviceMetricsOverride(page_pid, parameters, opts) View Source
setEmulatedMedia(page_pid) View Source
Emulates the given media for CSS media queries.
Parameters:
media -
setEmulatedMedia(page_pid, parameters) View Source
setEmulatedMedia(page_pid, parameters, opts) View Source
setGeolocationOverride(page_pid) View Source
Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.
Parameters:
latitude -
setGeolocationOverride(page_pid, parameters) View Source
setGeolocationOverride(page_pid, parameters, opts) View Source
setScriptExecutionDisabled(page_pid) View Source
Switches script execution in the page.
Parameters:
value -
setScriptExecutionDisabled(page_pid, parameters) View Source
setScriptExecutionDisabled(page_pid, parameters, opts) View Source
setTouchEmulationEnabled(page_pid) View Source
Enables touch on platforms which do not support them.
Parameters:
enabled -
setTouchEmulationEnabled(page_pid, parameters) View Source
setTouchEmulationEnabled(page_pid, parameters, opts) View Source
setUserAgentOverride(page_pid) View Source
Allows overriding user agent with the given string.
Parameters:
userAgent -