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

Supports additional targets discovery and allows to attach to them.

Link to this section Summary

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 - - flatten - - Enables "flat" access to the session via specifying sessionId attribute in the commands.

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

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.enableBeginFrameControl - - Whether BeginFrames for this target will be controlled via DevTools (headless chrome only, not supported on MacOS yet, false by default).newWindow - - Whether to create a new Window or Tab (chrome-only, false by default).background - - Whether to create the target in background or foreground (chrome-only, false by default).

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 session with given id.

Parameters: sessionId - - Session to detach.targetId - - Deprecated.

Link to this function

detachFromTarget(page_pid, parameters) View Source

Link to this function

detachFromTarget(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 over session with given id.

Parameters: message - - sessionId - - Identifier of the session.targetId - - Deprecated.

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

setDiscoverTargets(page_pid) View Source

Controls whether to discover available targets and notify via targetCreated/targetInfoChanged/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