Chrome Remote Interface v0.0.4 ChromeRemoteInterface.RPC.Target View Source

Supports additional targets discovery and allows to attach to them.

Link to this section Summary

Functions

Activates (focuses) the target

Attaches to the target with given id

Closes the target. If the target is a page that gets closed too

Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than one

Creates a new page

Detaches from the target with given id

Deletes a BrowserContext, will fail of any open page uses it

Returns information about a target

Retrieves a list of available targets

Sends protocol message to the target with given id

Controls whether to automatically attach to new targets which are considered to be related to this one. When turned on, attaches to all existing related targets as well. When turned off, automatically detaches from all currently attached targets

Controls whether to discover available targets and notify via targetCreated/targetDestroyed events

Enables target discovery for the specified locations, when setDiscoverTargets was set to true

Link to this section Functions

Link to this function activateTarget(page_pid) View Source

Activates (focuses) the target.

Parameters: targetId - -

Link to this function activateTarget(page_pid, parameters) View Source
Link to this function activateTarget(page_pid, parameters, opts) View Source
Link to this function attachToTarget(page_pid) View Source

Attaches to the target with given id.

Parameters: targetId - -

Link to this function attachToTarget(page_pid, parameters) View Source
Link to this function attachToTarget(page_pid, parameters, opts) View Source

Closes the target. If the target is a page that gets closed too.

Parameters: targetId - -

Link to this function closeTarget(page_pid, parameters) View Source
Link to this function closeTarget(page_pid, parameters, opts) View Source
Link to this function createBrowserContext(page_pid) View Source

Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than one.

Parameters:

Link to this function createBrowserContext(page_pid, parameters) View Source
Link to this function createBrowserContext(page_pid, parameters, opts) View Source

Creates a new page.

Parameters: url - - The initial URL the page will be navigated to.width - - Frame width in DIP (headless chrome only).height - - Frame height in DIP (headless chrome only).browserContextId - - The browser context to create the page in (headless chrome only).

Link to this function createTarget(page_pid, parameters) View Source
Link to this function createTarget(page_pid, parameters, opts) View Source
Link to this function detachFromTarget(page_pid) View Source

Detaches from the target with given id.

Parameters: targetId - -

Link to this function detachFromTarget(page_pid, parameters) View Source
Link to this function detachFromTarget(page_pid, parameters, opts) View Source
Link to this function disposeBrowserContext(page_pid) View Source

Deletes a BrowserContext, will fail of any open page uses it.

Parameters: browserContextId - -

Link to this function disposeBrowserContext(page_pid, parameters) View Source
Link to this function disposeBrowserContext(page_pid, parameters, opts) View Source

Returns information about a target.

Parameters: targetId - -

Link to this function getTargetInfo(page_pid, parameters) View Source
Link to this function getTargetInfo(page_pid, parameters, opts) View Source

Retrieves a list of available targets.

Parameters:

Link to this function getTargets(page_pid, parameters) View Source
Link to this function getTargets(page_pid, parameters, opts) View Source
Link to this function sendMessageToTarget(page_pid) View Source

Sends protocol message to the target with given id.

Parameters: targetId - - message - -

Link to this function sendMessageToTarget(page_pid, parameters) View Source
Link to this function sendMessageToTarget(page_pid, parameters, opts) View Source
Link to this function setAttachToFrames(page_pid) View Source

Parameters: value - - Whether to attach to frames.

Link to this function setAttachToFrames(page_pid, parameters) View Source
Link to this function setAttachToFrames(page_pid, parameters, opts) View Source

Controls whether to automatically attach to new targets which are considered to be related to this one. When turned on, attaches to all existing related targets as well. When turned off, automatically detaches from all currently attached targets.

Parameters: autoAttach - - Whether to auto-attach to related targets.waitForDebuggerOnStart - - Whether to pause new targets when attaching to them. Use Runtime.runIfWaitingForDebugger to run paused targets.

Link to this function setAutoAttach(page_pid, parameters) View Source
Link to this function setAutoAttach(page_pid, parameters, opts) View Source
Link to this function setDiscoverTargets(page_pid) View Source

Controls whether to discover available targets and notify via targetCreated/targetDestroyed events.

Parameters: discover - - Whether to discover available targets.

Link to this function setDiscoverTargets(page_pid, parameters) View Source
Link to this function setDiscoverTargets(page_pid, parameters, opts) View Source
Link to this function setRemoteLocations(page_pid) View Source

Enables target discovery for the specified locations, when setDiscoverTargets was set to true.

Parameters: locations - - List of remote locations.

Link to this function setRemoteLocations(page_pid, parameters) View Source
Link to this function setRemoteLocations(page_pid, parameters, opts) View Source